parameters: (dt)
return_statement: return dt
docstring: Given a datetime that may be imaginary, return an existing datetime.
  
      This function assumes that an imaginary datetime represents what the
      wall time would be in a zone had the offset transition not occurred, so
      it will always fall forward by the transition's change in offset.
  
      .. doctest::
  
          >>> from dateutil import tz
          >>> from datetime import datetime
          >>> NYC = tz.gettz('America/New_York')
          >>> print(tz.resolve_imaginary(datetime(2017, 3, 12, 2, 30, tzinfo=NYC)))
          2017-03-12 03:30:00-04:00
  
          >>> KIR = tz.gettz('Pacific/Kiritimati')
          >>> print(tz.resolve_imaginary(datetime(1995, 1, 1, 12, 30, tzinfo=KIR)))
          1995-01-02 12:30:00+14:00
  
      As a note, :func:`datetime.astimezone` is guaranteed to produce a valid,
      existing datetime, so a round-trip to and from UTC is sufficient to get
      an extant datetime, however, this generally "falls back" to an earlier time
      rather than falling forward to the STD side (though no guarantees are made
      about this behavior).
  
      :param dt:
          A :class:`datetime.datetime` which may or may not exist.
  
      :return:
          Returns an existing :class:`datetime.datetime`. If ``dt`` was not
          imaginary, the datetime returned is guaranteed to be the same object
          passed to the function.
  
      .. versionadded:: 2.7.0
docstring_summary: Given a datetime that may be imaginary, return an existing datetime.
docstring_tokens: Given a datetime that may be imaginary return an existing datetime .
function: def resolve_imaginary(dt):
      """
      Given a datetime that may be imaginary, return an existing datetime.
  
      This function assumes that an imaginary datetime represents what the
      wall time would be in a zone had the offset transition not occurred, so
      it will always fall forward by the transition's change in offset.
  
      .. doctest::
  
          >>> from dateutil import tz
          >>> from datetime import datetime
          >>> NYC = tz.gettz('America/New_York')
          >>> print(tz.resolve_imaginary(datetime(2017, 3, 12, 2, 30, tzinfo=NYC)))
          2017-03-12 03:30:00-04:00
  
          >>> KIR = tz.gettz('Pacific/Kiritimati')
          >>> print(tz.resolve_imaginary(datetime(1995, 1, 1, 12, 30, tzinfo=KIR)))
          1995-01-02 12:30:00+14:00
  
      As a note, :func:`datetime.astimezone` is guaranteed to produce a valid,
      existing datetime, so a round-trip to and from UTC is sufficient to get
      an extant datetime, however, this generally "falls back" to an earlier time
      rather than falling forward to the STD side (though no guarantees are made
      about this behavior).
  
      :param dt:
          A :class:`datetime.datetime` which may or may not exist.
  
      :return:
          Returns an existing :class:`datetime.datetime`. If ``dt`` was not
          imaginary, the datetime returned is guaranteed to be the same object
          passed to the function.
  
      .. versionadded:: 2.7.0
      """
      if dt.tzinfo is not None and not datetime_exists(dt):
  
          curr_offset = (dt + datetime.timedelta(hours=24)).utcoffset()
          old_offset = (dt - datetime.timedelta(hours=24)).utcoffset()
  
          dt += curr_offset - old_offset
  
      return dt
function_tokens: def resolve_imaginary ( dt ) : if dt . tzinfo is not None and not datetime_exists ( dt ) : curr_offset = ( dt + datetime . timedelta ( hours = 24 ) ) . utcoffset ( ) old_offset = ( dt - datetime . timedelta ( hours = 24 ) ) . utcoffset ( ) dt += curr_offset - old_offset return dt