code: def einsum(*args):
      from pgmpy import config
  
      if config.BACKEND == "numpy":
          return np.einsum(*args)
      else:
          return torch.einsum(*args)
  
file_path: pgmpy/pgmpy/utils/compat_fns.py
imports: from copy import deepcopy
  import numpy
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: einsum() and returns: np, torch