code: def _get_or_create(
      self,
      obj_type,
      run_id=None,
      step_name=None,
      task_id=None,
      tags=None,
      sys_tags=None,
  ):
      if tags is None:
          tags = set()
      if sys_tags is None:
          sys_tags = set()
  
      def create_object():
          data = self._object_to_json(
              obj_type,
              run_id,
              step_name,
              task_id,
              self.sticky_tags.union(tags),
              self.sticky_sys_tags.union(sys_tags),
          )
          return self._request(
              self._monitor,
              create_path,
              "POST",
              data=data,
              retry_409_path=obj_path,
          )
  
      always_create = False
      obj_path = self._obj_path(
          self._flow_name, run_id, step_name, task_id
      )
      create_path = self._create_path(
          obj_type, self._flow_name, run_id, step_name
      )
      if obj_type == "run" and run_id is None:
          always_create = True
      elif obj_type == "task" and task_id is None:
          always_create = True
  
      if always_create:
          return create_object()
  
      try:
          return self._request(self._monitor, obj_path, "GET")
      except ServiceException as ex:
          if ex.http_code == 404:
              return create_object()
          else:
              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 22 for calling the ServiceMetadataProvider obj's underlying member method code with example usage: obj._get_or_create(obj_type, run_id, step_name, task_id, tags, sys_tags) and returns: self, create_object, self, create_object