code: def _parse_date_string(date_str):
          
          # If input is None, return None
          if date_str is None:
              return None
  
          # Standard format for FCS2.0
          try:
              return datetime.datetime.strptime(date_str, '%d-%b-%y')
          except ValueError:
              pass
          # Standard format for FCS3.0
          try:
              return datetime.datetime.strptime(date_str, '%d-%b-%Y')
          except ValueError:
              pass
          # Nonstandard format 1
          try:
              return datetime.datetime.strptime(date_str, '%y-%b-%d')
          except ValueError:
              pass
          # Nonstandard format 2
          try:
              return datetime.datetime.strptime(date_str, '%Y-%b-%d')
          except ValueError:
              pass
  
          # If none of these formats work, return None
          return None
docs: Get a datetime.date object from a string date representation.
  
          The FCS standard includes an optional keyword parameter $DATE in
          which the acquistion date is stored. In FCS 2.0, the date is saved
          as 'dd-mmm-yy', whereas in FCS 3.0 and 3.1 the date is saved as
          'dd-mmm-yyyy'.
  
          This function attempts to parse these formats, along with a couple
          of nonstandard ones, using the datetime module.
  
          Parameters:
          -----------
          date_str : str, or None
              String representation of date, or None.
  
          Returns:
          --------
          t : datetime.datetime, or None
              Date parsed from `date_str`. If parsing was not possible,
              return None. If `date_str` is None, return None