from datetime import datetime
from dateutil import tz


def _epoch_to_datetime(epoch_seconds):
    """
    Converts a UTC UNIX epoch timestamp to a Python DateTime object

    Args:
        epoch_seconds: A UNIX epoch value

    Returns:
        DateTime: A Python DateTime representation of the epoch value

    """
    if type(epoch_seconds) == datetime:
        return epoch_seconds
    else:
        return datetime.fromtimestamp(int(epoch_seconds), tz=tz.tzutc())