#NEWLINE# def _get_memory_banks_listed_in_dir( path ) : #NEWLINE# #INDENT# 'Get all memory banks the kernel lists in a given directory.\n    Such a directory can be /sys/devices/system/node/ (contains all memory banks)\n    or /sys/devices/system/cpu/cpu*/ (contains all memory banks on the same NUMA node as that core).' #NEWLINE# return [ int ( entry [ 4 : ] ) for entry in os . listdir ( path ) if entry . startswith ( 'node' ) ]