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","`","."]
code: def _load_legacy_op(self, modname, path, fname):
      # support old version operator API
      file_name = path / (fname + ".py")
      spec = importlib.util.spec_from_file_location(modname, file_name)
      # Create the module and then execute the module in its own namespace.
  
      module = importlib.util.module_from_spec(spec)
      sys.modules[modname] = module
      spec.loader.exec_module(module)
      # Instantiate the operator object and return it to the caller for
      # `load_operator`. By convention, the operator class is simply the CamelCase
      # version of the snake_case operator.
      op_cls = "".join(x.capitalize() or "_" for x in fname.split("_"))
      op = getattr(module, op_cls)
      return op
  
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 3 for calling the OperatorLoader obj's underlying member method code with example usage: obj._load_legacy_op(modname, path, fname) and returns: op