code: def filter_styles(style, group, other_groups, blacklist=None):
      """
      Filters styles which are specific to a particular artist, e.g.
      for a GraphPlot this will filter options specific to the nodes and
      edges.
  
      Arguments
      ---------
      style: dict
          Dictionary of styles and values
      group: str
          Group within the styles to filter for
      other_groups: list
          Other groups to filter out
      blacklist: list (optional)
          List of options to filter out
  
      Returns
      -------
      filtered: dict
          Filtered dictionary of styles
      """
      if blacklist is None:
          blacklist = []
      group = group + "_"
      filtered = {}
      for k, v in style.items():
          if (
              any(k.startswith(p) for p in other_groups)
              or k.startswith(group)
              or k in blacklist
          ):
              continue
          filtered[k] = v
      for k, v in style.items():
          if not k.startswith(group) or k in blacklist:
              continue
          filtered[k[len(group) :]] = v
      return filtered
  
imports: import inspect
  import re
  import warnings
  import matplotlib
  import numpy
  from matplotlib import ticker, units
  from matplotlib.colors import Normalize, cnames
  from matplotlib.lines import Line2D
  from matplotlib.markers import MarkerStyle
  from matplotlib.patches import Path, PathPatch
  from matplotlib.rcsetup import validate_fontsize, validate_fonttype, validate_hatch
  from matplotlib.transforms import Affine2D, Bbox, TransformedBbox
  from packaging.version import Version
  from ...core.util import arraylike_types, cftime_types, is_number
  from ...element import RGB, Polygons, Raster
  from ..util import COLOR_ALIASES, RGB_HEX_REGEX
label_desc: Use image node_id 5 for calling a global function with example usage: filter_styles(style, group, other_groups, blacklist) and returns: filtered