code: def to_datetime(value):
      
      if value is None:
          return None
  
      if isinstance(value, six.integer_types):
          return parser.parse(value)
      return parser.isoparse(value)
docs: Converts a string to a datetime.