from typing import Dict
from typing import Any


def asset_list_handler(response: Dict[str, Any], remove_if_null: str):
    """
    Creates a readable response for one asset response. Is sent as **handle_one_response** to *create_readable_response*.

    :param response: The response to turn to human readable
    :param remove_if_null: Field name that if it has no value- the whole response will be ignored
    """
    new_info = []
    response_entry = {key: response[key] for key in ['id', 'name'] if key in response}
    if 'info' in response:
        for asset_info in response['info']:
            if asset_info['keyCaption'] in ['Model', 'Description'] and asset_info[remove_if_null]:
                new_info.append(f'{asset_info["keyCaption"]}: {asset_info["valueCaption"]}')

        response_entry['info'] = new_info
    return response_entry