new_contents: from enum import Enum, auto
  
  
  class EndpointType(Enum):
      # endpoint / collection types
      GCP = auto()
      GCSV5_ENDPOINT = auto()
      GUEST_COLLECTION = auto()
      MAPPED_COLLECTION = auto()
      SHARE = auto()
      NON_GCSV5_ENDPOINT = auto()  # most likely GCSv4, but not necessarily
  
  
  def determine_endpoint_type(ep_doc: dict) -> EndpointType:
      """
      Given an endpoint document from transfer, determine what type of
      endpoint or collection it is for
      """
      if ep_doc["is_globus_connect"] is True:
          return EndpointType.GCP
  
      if ep_doc["non_functional"] is True:
          return EndpointType.GCSV5_ENDPOINT
  
      shared = ep_doc["host_endpoint_id"] is not None
  
      if ep_doc["gcs_version"]:
          major, minor, patch = ep_doc["gcs_version"].split(".")
          gcsv5 = major == "5"
      else:
          gcsv5 = False
  
      if gcsv5:
          if shared:
              return EndpointType.GUEST_COLLECTION
          else:
              return EndpointType.MAPPED_COLLECTION
  
      elif shared:
          return EndpointType.SHARE
  
      return EndpointType.NON_GCSV5_ENDPOINT
  
subject: add determine_endpoint_type helper