def get_name_frame_code(GOP_struct, idx_code):
    """
    Return a list of name (frame_i) with all frames that have
    coding_order = <idx_code> in the given GOP structure <GOP_struct>.
    """

    name_frame_code = []

    for f in GOP_struct:
        if GOP_struct.get(f).get('coding_order') == idx_code:
            name_frame_code.append(f)
    
    # If nothing has been found, return the empty list
    return name_frame_code