code: def Rfindalldirs(self, pathlist):
          
          try:
              memo_dict = self._memo['Rfindalldirs']
          except KeyError:
              memo_dict = {}
              self._memo['Rfindalldirs'] = memo_dict
          else:
              try:
                  return memo_dict[pathlist]
              except KeyError:
                  pass
  
          create_dir_relative_to_self = self.Dir
          result = []
          for path in pathlist:
              if isinstance(path, SCons.Node.Node):
                  result.append(path)
              else:
                  dir = create_dir_relative_to_self(path)
                  result.extend(dir.get_all_rdirs())
  
          memo_dict[pathlist] = result
  
          return result
docs: Return all of the directories for a given path list, including
          corresponding "backing" directories in any repositories.
  
          The Node lookups are relative to this Node (typically a
          directory), so memoizing result saves cycles from looking
          up the same path for each target in a given directory.