import json


def load_data(data):
    """ Wrapper to load json data, to be compatible with Python3.
    Returns: JSON data

    Keyword arguments:
    data: might be bytes or str
    """
    if type(data) == bytes:
        return json.loads(data.decode("utf-8"))
    else:
        return json.loads(data)