def _IsOutsideTimeRange(timestamp,
                        time_range = None):
  """Returns a boolean indicating whether a timestamp is in a given range."""
  return time_range is not None and (timestamp < time_range[0] or
                                     timestamp > time_range[1])