def format_header_for_list_commands(base_header: str, rows_count: int,
                                    page: int, page_size: int, limit: int) -> str:
    """
    Retrieve the header of the readable output for list commands.
    Format the header according to the pagination use case:
    'Manual Pagination' or 'Automatic Pagination'.
    Args:
        base_header (str): The header prefix.
        rows_count (int): The number of rows in the output.
        page (int): Client's page number argument.
        page_size (int): number of records per page.
        limit (int): Client's limit argument.
    Returns:
        Dict[str, Any]: Header for readable output of the command.
    """
    if page_size:
        total_pages = rows_count // page_size + (rows_count % page_size != 0)
        if rows_count > 0:
            base_header += f' \nShowing page {page} out of {total_pages} total pages.' \
                           f' Current page size: {page_size}.'
    else:
        base_header += f' \nShowing 0 to {limit} records out of {rows_count}.'
    return base_header