class_docstr: Wrapper class used to load operators from either local cache or a remote
  location.
  
  Args:
      cache_path: (`str`)
          Local cache path to use. If not specified, it will default to
          `$HOME/.towhee/operators`.
class_docstr_tok: ["Wrapper","class","used","to","load","operators","from","either","local","cache","or","a","remote","location",".","Args",":","cache_path",":","(","`","str","`",")","Local","cache","path","to","use",".","If","not","specified",",","it","will","default","to","`","$","HOME\/.towhee\/operators","`","."]
docstr: Attempts to load an operator from cache. If it does not exist, looks up the
  operator in a remote location and downloads it to cache instead. By standard
  convention, the operator must be called `Operator` and all associated data must
  be contained within a single directory.
  
  Args:
      function: (`str`)
          Origin and method/class name of the operator. Used to look up the proper
          operator in cache.
docstr_tok: ["Attempts","to","load","an","operator","from","cache",".","If","it","does","not","exist",",","looks","up","the","operator","in","a","remote","location","and","downloads","it","to","cache","instead",".","By","standard","convention",",","the","operator","must","be","called","`","Operator","`","and","all","associated","data","must","be","contained","within","a","single","directory",".","Args",":","function",":","(","`","str","`",")","Origin","and","method\/class","name","of","the","operator",".","Used","to","look","up","the","proper","operator","in","cache","."]
code: def load_operator(
      self,
      function: str,
      arg: List[Any],
      kws: Dict[str, Any],
      tag: str,
      latest: bool,
  ) -> Operator:
      """
      Attempts to load an operator from cache. If it does not exist, looks up the
      operator in a remote location and downloads it to cache instead. By standard
      convention, the operator must be called `Operator` and all associated data must
      be contained within a single directory.
  
      Args:
          function: (`str`)
              Origin and method/class name of the operator. Used to look up the proper
              operator in cache.
      """
      for factory in [
          self._load_operator_from_internal,
          self._load_operator_from_registry,
          self._load_operator_from_hub,
      ]:
          op = factory(function, arg, kws, tag, latest)
          if op is not None:
              return op
      if op is None:
          raise RuntimeError("Load operator failed")
  
imports: import importlib
  import sys
  import subprocess
  from pathlib import Path
  from typing import Any, List, Dict, Union
  import re
  import traceback
  import pkg_resources
  import hashlib
  from towhee.operator import Operator
  from towhee.operator.nop import NOPNodeOperator
  from towhee.hub import get_operator
  from towhee.runtime.constants import OPName
  from towhee.utils.log import engine_log
  from .operator_registry import OperatorRegistry
label_desc: Use image node_id 7 for calling the OperatorLoader obj's underlying member method code with example usage: obj.load_operator(function, arg, kws, tag, latest) and returns: op