code: def get_attrs_to_paths(schema, attrs_to_paths=None, path=None):
      
      attrs_to_paths = attrs_to_paths or {}
      tag = schema[0]
      if len(schema) == 1:
          _insert_attr_path(attrs_to_paths, tag, "/".join(path + [tag]))
      else:
          for elem in schema[1:]:
              if isinstance(elem, dict):
                  continue
              new_path = [] if path is None else path + [tag]
              if isinstance(elem, (list, tuple)):
                  attrs_to_paths.update(
                      get_attrs_to_paths(
                          elem, attrs_to_paths=attrs_to_paths, path=new_path
                      )
                  )
              else:
                  _insert_attr_path(attrs_to_paths, tag, "/".join(new_path))
      return attrs_to_paths
docs: Analyze PREMIS-element-as-tuple ``schema`` and return a dict that maps
      attribute names to the simplified XPaths needed to retrieve them, e.g.,::
  
          >>> {'object_identifier_type':
                  'object_identifier/object_identifier_type',
               'object_identifier_value':
                  'object_identifier/object_identifier_value'}