code: def _auto_cast(x):
      # Upcast scalars
      if isinstance(x, np.ScalarType):
          if x.dtype.kind == "i":
              if x.dtype != np.int64:
                  x = x.astype(np.int64)
          elif x.dtype.kind == "f":
              if x.dtype != np.float64:
                  x = x.astype(np.float64)
      return x
  
file_path: mne-python/mne/io/ctf/res4.py
imports: import os.path
  import numpy
  from ...utils import logger
  from .constants import CTF
label_desc: Use image node_id 11 for calling a global function with example usage: _auto_cast(x) and returns: x