code: def _get_object_internal(
      cls,
      obj_type,
      obj_order,
      sub_type,
      sub_order,
      filters,
      attempt,
      *args,
  ):
      if attempt is not None:
          if cls._supports_attempt_gets is None:
              version = cls._version(None)
              cls._supports_attempt_gets = (
                  version is not None
                  and version_parse(version) >= version_parse("2.0.6")
              )
          if not cls._supports_attempt_gets:
              raise ServiceException(
                  "Getting specific attempts of Tasks or Artifacts requires "
                  "the metaflow service to be at least version 2.0.6. Please "
                  "upgrade your service"
              )
  
      if sub_type == "self":
          if obj_type == "artifact":
              # Special case with the artifacts; we add the attempt
              url = ServiceMetadataProvider._obj_path(
                  *args[:obj_order], attempt=attempt
              )
          else:
              url = ServiceMetadataProvider._obj_path(*args[:obj_order])
          try:
              v, _ = cls._request(None, url, "GET")
              return MetadataProvider._apply_filter([v], filters)[0]
          except ServiceException as ex:
              if ex.http_code == 404:
                  return None
              raise
  
      # For the other types, we locate all the objects we need to find and return them
      if obj_type != "root":
          url = ServiceMetadataProvider._obj_path(*args[:obj_order])
      else:
          url = ""
      if sub_type == "metadata":
          url += "/metadata"
      elif (
          sub_type == "artifact"
          and obj_type == "task"
          and attempt is not None
      ):
          url += "/attempt/%s/artifacts" % attempt
      else:
          url += "/%ss" % sub_type
      try:
          v, _ = cls._request(None, url, "GET")
          return MetadataProvider._apply_filter(v, filters)
      except ServiceException as ex:
          if ex.http_code == 404:
              return None
          raise
  
imports: import os
  import random
  import requests
  import time
  from metaflow.exception import MetaflowException, MetaflowTaggingError, MetaflowInternalError
  from metaflow.metaflow_config import SERVICE_RETRY_COUNT, SERVICE_HEADERS, SERVICE_URL
  from metaflow.metadata import MetadataProvider
  from metaflow.metadata.heartbeat import HB_URL_KEY
  from metaflow.sidecar import Message, MessageTypes, Sidecar
  from metaflow.util import version_parse
label_desc: Use image node_id 17 for calling the ServiceMetadataProvider obj's underlying member method code with example usage: obj._get_object_internal(cls, obj_type, obj_order, sub_type, sub_order, filters, attempt) and returns: MetadataProvider, MetadataProvider, None, None