code: def resource(ref: str, delimiter: str = None) -> str:
      
  
      return ref.split(delimiter if delimiter else '#')[0]
docs: Given a (URI) reference, return up to its delimiter (exclusively), or all of it if there is none.
  
      :param ref: reference
      :param delimiter: delimiter character (default None maps to '#', or ';' introduces identifiers)