code: def from_gps(gps):
      
      try:
          gps = LIGOTimeGPS(gps)
      except (ValueError, TypeError, RuntimeError):
          gps = LIGOTimeGPS(float(gps))
      sec, nano = gps.gpsSeconds, gps.gpsNanoSeconds
      date = Time(sec, format='gps', scale='utc').datetime
      return date + datetime.timedelta(microseconds=nano*1e-3)
docs: Convert a GPS time into a `datetime.datetime`.
  
      Parameters
      ----------
      gps : `LIGOTimeGPS`, `int`, `float`
          GPS time to convert
  
      Returns
      -------
      datetime : `datetime.datetime`
          ISO-format datetime equivalent of input GPS time
  
      Examples
      --------
      >>> from_gps(1167264018)
      datetime.datetime(2017, 1, 1, 0, 0)
      >>> from_gps(1126259462.3910)
      datetime.datetime(2015, 9, 14, 9, 50, 45, 391000)