code: def load_maps(dirspec):
      
      mapd = {}
      if dirspec not in sys.path:
          sys.path.insert(0, dirspec)
  
      for fil in os.listdir(dirspec):
          if fil.endswith(".py"):
              mod = import_module(fil[:-3])
              for key, item in mod.__dict__.items():
                  if key.startswith("__"):
                      continue
                  if isinstance(item, dict) and "to" in item and "fro" in item:
                      mapd[item["identifier"]] = item
  
      return mapd
docs: load the attribute maps
  
      :param dirspec: a directory specification
      :return: a dictionary with the name of the map as key and the
          map as value. The map itself is a dictionary with two keys:
          "to" and "fro". The values for those keys are the actual mapping.