docstr: This function will return the vSphere object.
  The argument for `vimtype` can be "vim.VirtualMachine", "vim.HostSystem",
  "vim.Datastore", etc.
  Then either the name or the object id need to be provided.
  To check all such object information, you can go to the managed object board
  page of your vCenter Server, such as: https://<your_vc_ip/mob
docstr_tok: ["This","function","will","return","the","vSphere","object",".","The","argument","for","`","vimtype","`","can","be","``","vim.VirtualMachine","''",",","``","vim.HostSystem","''",",","''","vim.Datastore","''",",","etc",".","Then","either","the","name","or","the","object","id","need","to","be","provided",".","To","check","all","such","object","information",",","you","can","go","to","the","managed","object","board","page","of","your","vCenter","Server",",","such","as",":","https",":","\/\/","<","your_vc_ip\/mob"]
code: def get_pyvmomi_obj(self, vimtype, name=None, obj_id=None):
      """
      This function will return the vSphere object.
      The argument for `vimtype` can be "vim.VirtualMachine", "vim.HostSystem",
      "vim.Datastore", etc.
      Then either the name or the object id need to be provided.
      To check all such object information, you can go to the managed object board
      page of your vCenter Server, such as: https://<your_vc_ip/mob
      """
      if not name and not obj_id:
          # Raise runtime error because this is not user fault
          object_type = get_object_type(vimtype)
          raise ValueError(
              f"Either name or obj id must be provided for {object_type}"
          )
      if self.pyvmomi_sdk_client is None:
          raise ValueError("Must init pyvmomi_sdk_client first")
  
      cached_obj = self.get_obj_from_cache(vimtype, name, obj_id)
      if cached_obj:
          return cached_obj
  
      cached_obj = self.get_obj_from_cache(vimtype, name, obj_id)
      if cached_obj:
          return cached_obj
  
      container = self.pyvmomi_sdk_client.content.viewManager.CreateContainerView(
          self.pyvmomi_sdk_client.content.rootFolder, vimtype, True
      )
      obj = None
      # If both name and moid are provided we will prioritize name.
      if name:
          for candidate in container.view:
              if candidate.name == name:
                  obj = candidate
      elif obj_id:
          for candidate in container.view:
              if obj_id in str(candidate):
                  obj = candidate
      if obj:
          self.put_obj_in_cache(vimtype, obj)
          return obj
      raise ValueError(
          f"Cannot find the object with type {vimtype} on vSphere with"
          f"name={name} and obj_id={obj_id}"
      )
  
imports: import atexit
  import logging
  import ssl
  import time
  from enum import Enum
  from pyVim.connect import Disconnect, SmartStubAdapter, VimSessionOrientedStub
  from pyVim.task import WaitForTask
  from pyVmomi import vim, vmodl
  from ray.autoscaler._private.vsphere.utils import Constants, is_ipv4, singleton_client
label_desc: Use image node_id 5 for calling the PyvmomiSdkProvider obj's underlying member method code with example usage: obj.get_pyvmomi_obj(vimtype, name, obj_id) and returns: cached_obj, cached_obj, obj