code: def datetime_from_ISO_string(s):
      
      try:
          return datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%S')
      except ValueError:
          try:
              return datetime.datetime.strptime(s, '%Y-%m-%d')
          except ValueError:
              return datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%S.%f')
docs: Take an ISO date string of the form YYYY-MM-DDTHH:MM:SS.S
      and convert it into an instance of datetime.datetime