import copy


def create_query_entity_output(table_name: str, raw_response: dict, is_entity_query: bool) -> dict:
    """
    Create query_entity_command outputs.
    Args:
        table_name (str): Command table name.
        raw_response (str): API response from Azure.
        is_entity_query (bool): Indicates to path to the response data.

    Returns:
        dict: Command response.

    """
    outputs = {"name": table_name}
    response_copy = copy.deepcopy(raw_response)

    if is_entity_query:
        outputs["Entity"] = [response_copy]  # type: ignore
    else:
        outputs["Entity"] = response_copy.get('value')  # type: ignore

    for entity in outputs.get("Entity"):  # type: ignore
        convert_dict_time_format(entity, ['Timestamp'])  # type: ignore

    return outputs