code: def scan_in_memory(node, env, path=()):
      
      try:
          entries = node.entries
      except AttributeError:
          # It's not a Node.FS.Dir (or doesn't look enough like one for
          # our purposes), which can happen if a target list containing
          # mixed Node types (Dirs and Files, for example) has a Dir as
          # the first entry.
          return []
      entry_list = sorted(filter(do_not_scan, list(entries.keys())))
      return [entries[n] for n in entry_list]
docs: "Scans" a Node.FS.Dir for its in-memory entries.