import pytz


def _add_utc_tz(utc_dt):
  """Add UTC timezone information to the datetime object.

  Args:
    utc_dt (datetime.datetime): arbitrary timestamp.

  Raises:
    ValueError: if dt is not naive nor already UTC.

  Returns:
   utc_dt (datetime.datetime): timestamp with timezone information set to UTC.
  """
  if utc_dt.tzinfo is None or utc_dt.tzinfo.utcoffset(utc_dt) is None:
    return utc_dt.replace(tzinfo=pytz.UTC)

  raise ValueError("datetime object must be utc or naive. Got %s",
                   utc_dt.tzinfo)