code: def _load_model(path: Path):
      if path.is_file():
          return torch.load(path)
      else:
          return load_with_torch_fx(path)
  
imports: import json
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Callable, Dict
  import numpy
  from loguru import logger
  from nebullvm.operations.optimizations.compressors.base import Compressor
  from nebullvm.optional_modules.torch import torch, Module
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.pytorch import save_with_torch_fx, load_with_torch_fx
  from nebullvm.tools.venv import run_in_different_venv
label_desc: Use image node_id 2 for calling a global function with example usage: _load_model(path) and returns: torch, load_with_torch_fx