code: def datetime_match(data, dts):
      
      dts = dts if islistable(dts) else [dts]
      if any([not isinstance(i, datetime.datetime) for i in dts]):
          error_msg = (
              "`time` can only be filtered by datetimes"
          )
          raise TypeError(error_msg)
      return data.isin(dts)
docs: matching of datetimes in time columns for data filtering