def has_feature(td, feature):
    """
        Checks for feature in DISTRO_FEATURES or IMAGE_FEATURES.
    """

    if (feature in td.get('DISTRO_FEATURES', '') or
        feature in td.get('IMAGE_FEATURES', '')):
        return True
    return False