code: def safe_date(value, date_format, datetime_unit):
      date_str = value.strip().strip("'").strip('"')
      if date_str == "?":
          return np.datetime64("NaT", datetime_unit)
      else:
          dt = datetime.datetime.strptime(date_str, date_format)
          return np.datetime64(dt).astype(
              "datetime64[%s]" % datetime_unit
          )
  
imports: from __future__ import division, print_function, absolute_import
  import re
  import itertools
  import datetime
  from functools import partial
  import numpy
  from scipy._lib.six import next
label_desc: Use image node_id 15 for calling a global function with example usage: safe_date(value, date_format, datetime_unit) and returns: np, np