code: def ones(n):
      from pgmpy import config
  
      if config.BACKEND == "numpy":
          return np.ones(n, dtype=config.DTYPE)
  
      else:
          return torch.ones(n, dtype=config.DTYPE, device=config.DEVICE)
  
file_path: pgmpy/pgmpy/utils/compat_fns.py
imports: from copy import deepcopy
  import numpy
  import torch
label_desc: Use image node_id 10 for calling a global function with example usage: ones(n) and returns: np, torch