def make_hashable(data):
    """Make the given object hashable.

    It makes it ready to use in a `hash()` call, making sure that
    it's always the same for lists and dictionaries if they have the same items.

    :param object data: the object to hash
    :return: a hashable object
    :rtype: object
    """
    if isinstance(data, (list, tuple)):
        return tuple((make_hashable(item) for item in data))
    elif isinstance(data, dict):
        return tuple(
            (key, make_hashable(value))
            for key, value in sorted(data.items())
        )
    else:
        return data