code: def _str_to_meas_date(date_str):
      date_str = date_str.strip()
  
      if date_str in ["", "0", "00000000000000000000"]:
          return None
  
      # these calculations are in naive time but should be okay since
      # they are relative (subtraction below)
      try:
          meas_date = datetime.strptime(date_str, "%Y%m%d%H%M%S%f")
      except ValueError as e:
          if "does not match format" in str(e):
              return None
          else:
              raise
  
      meas_date = meas_date.replace(tzinfo=timezone.utc)
      return meas_date
  
imports: import configparser
  import os
  import os.path
  import re
  from datetime import datetime, timezone
  from io import StringIO
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _mult_cal_one, _read_segments_file
  from ...annotations import Annotations, read_annotations
  from ...channels import make_dig_montage
  from ...defaults import HEAD_SIZE_DEFAULT
  from ...transforms import _sph_to_cart
  from ...utils import _DefaultEventParser, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
label_desc: Use image node_id 5 for calling a global function with example usage: _str_to_meas_date(date_str) and returns: meas_date, None, None