code: def _ensure_path(fname):
      out = fname
      if not isinstance(out, Path):
          out = Path(out)
      return out
  
imports: from collections import OrderedDict
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  from ..._fiff.meas_info import create_info
  from ..._fiff.utils import _mult_cal_one
  from ...annotations import Annotations
  from ...utils import _check_fname, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
label_desc: Use image node_id 1 for calling a global function with example usage: _ensure_path(fname) and returns: out