def energy_type(service_category):
    """
    Returns the seed model energy type corresponding to the green button
    service category.

    :param service_category: int that is a green button service_category
    (string args will be converted to ints)
    :returns: int in seed.models.ENERGY_TYPES
    """

    # Valid values include: 0 - electricity 1 - gas 2 - water 4 - pressure
    # 5 - heat 6 - cold 7 - communication 8 - time

    # green_button example data only contains electricity and gas.
    # We will need to add more energy types to support the types
    # not present in seed.models.ENERGY_TYPES
    service_category = int(service_category)
    category_mapping = {
        0: seed.models.ELECTRICITY,
        1: seed.models.NATURAL_GAS,
    }

    if category_mapping in service_category:
        return category_mapping[service_category]
    else:
        return None
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/green_button/xml_importer.py/energy_type/swapped operands of `in`