code: def _handle_meas_date(meas_date):
      """Convert meas_date to datetime or None.
  
      If `meas_date` is a string, it should conform to the ISO8601 format.
      More precisely to this '%Y-%m-%d %H:%M:%S.%f' particular case of the
      ISO8601 format where the delimiter between date and time is ' '.
      Note that ISO8601 allows for ' ' or 'T' as delimiters between date and
      time.
      """
      if isinstance(meas_date, str):
          ACCEPTED_ISO8601 = "%Y-%m-%d %H:%M:%S.%f"
          try:
              meas_date = datetime.strptime(meas_date, ACCEPTED_ISO8601)
          except ValueError:
              meas_date = None
          else:
              meas_date = meas_date.replace(tzinfo=timezone.utc)
      elif isinstance(meas_date, tuple):
          # old way
          meas_date = _stamp_to_dt(meas_date)
      if meas_date is not None:
          if np.isscalar(meas_date):
              # It would be nice just to do:
              #
              #     meas_date = datetime.fromtimestamp(meas_date, timezone.utc)
              #
              # But Windows does not like timestamps < 0. So we'll use
              # our specialized wrapper instead:
              meas_date = np.array(np.modf(meas_date)[::-1])
              meas_date *= [1, 1e6]
              meas_date = _stamp_to_dt(np.round(meas_date))
          _check_dt(meas_date)  # run checks
      return meas_date
  
imports: import json
  import os.path
  import re
  import warnings
  from collections import Counter, OrderedDict
  from collections.abc import Iterable
  from copy import deepcopy
  from datetime import datetime, timedelta, timezone
  from itertools import takewhile
  from textwrap import shorten
  import numpy
  from scipy.io import loadmat
  from ._fiff.constants import FIFF
  from ._fiff.open import fiff_open
  from ._fiff.tag import read_tag
  from ._fiff.tree import dir_tree_find
  from ._fiff.write import _safe_name_list, end_block, start_and_end_file, start_block, write_double, write_float, write_name_list_sanitized, write_string
  from .utils import _check_dict_keys, _check_dt, _check_fname, _check_option, _check_pandas_installed, _check_time_format, _convert_times, _DefaultEventParser, _dt_to_stamp, _is_numeric, _mask_to_onsets_offsets, _on_missing, _pl, _stamp_to_dt, _validate_type, check_fname, fill_doc, int_like, logger, verbose, warn
label_desc: Use image node_id 4 for calling a global function with example usage: _handle_meas_date(meas_date) and returns: meas_date