code: def _parse_date(date):
      if date.startswith("@"):  # unix timestamp
          timestamp = int(date[1:])
      else:
          try:
              import dateutil.parser
          except ImportError:
              raise MissingExternalDependency(
                  "python-dateutil",
                  msg="This package is required to parse non-timestamp dates",
              )
  
          from calendar import timegm
  
          # Note: datetime.timestamp isn't available in Python 2.
          try:
              timestamp = timegm(
                  dateutil.parser.parse(date).utctimetuple()
              )
          except TypeError as exc:
              # Make older dateutil versions return a consistent error for
              # invalid dates.
              raise ValueError(exc)
      return timestamp
  
file_path: datalad/datalad/local/check_dates.py
imports: import json
  import logging
  import os
  import time
  from datalad.interface.base import Interface
  from datalad.interface.base import build_doc
  from datalad.interface.results import get_status_dict
  from datalad.support.exceptions import CapturedException, InvalidGitRepositoryError, MissingExternalDependency
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_date(date) and returns: timestamp