code: def filter_axes(axs, get: AxesLocation = "all"):
      """
      Return subset of axes
      """
      if get == "all":
          return axs
  
      # e.g. is_first_row, is_last_row, ..
      pred_method = f"is_{get}"
      return [
          ax
          for spec, ax in zip(get_subplotspec_list(axs), axs)
          if getattr(spec, pred_method)()
      ]
  
imports: from __future__ import annotations
  import typing
  from abc import ABC
  from dataclasses import dataclass, fields
  from itertools import chain
  from matplotlib._tight_layout import get_subplotspec_list
  from ..facets import facet_grid, facet_null, facet_wrap
  from .patches import SFancyBboxPatch
  from .utils import bbox_in_figure_space, tight_bbox_in_figure_space
label_desc: Use image node_id 5 for calling a global function with example usage: filter_axes(axs, get) and returns: unknown, axs