def format_level_2_memory(memory, header=None):
memory_list = []<EOL>for shot_memory in memory:<EOL><INDENT>memory_list.append(format_counts_memory(shot_memory, header))<EOL><DEDENT>return memory_list<EOL>
Format an experiment result memory object for measurement level 2.

    Args:
        memory (list): Memory from experiment with `meas_level==2` and `memory==True`.
        header (dict): the experiment header dictionary containing
            useful information for postprocessing.

    Returns:
        list[str]: List of bitstrings