code: def _matplotlib_list(interval_list):
      """
      Returns lists for matplotlib ``fill`` command from a list of bounding
      rectangular intervals
      """
      xlist = []
      ylist = []
      if len(interval_list):
          for intervals in interval_list:
              intervalx = intervals[0]
              intervaly = intervals[1]
              xlist.extend(
                  [
                      intervalx.start,
                      intervalx.start,
                      intervalx.end,
                      intervalx.end,
                      None,
                  ]
              )
              ylist.extend(
                  [
                      intervaly.start,
                      intervaly.end,
                      intervaly.end,
                      intervaly.start,
                      None,
                  ]
              )
      else:
          # XXX Ugly hack. Matplotlib does not accept empty lists for ``fill``
          xlist.extend((None, None, None, None))
          ylist.extend((None, None, None, None))
      return xlist, ylist
  
file_path: sympy/sympy/plotting/backends/matplotlibbackend/matplotlib.py
imports: from collections.abc import Callable
  from sympy.core.basic import Basic
  from sympy.external import import_module
  import sympy.plotting.backends.base_backend
  from sympy.printing.latex import latex
label_desc: Use image node_id 2 for calling a global function with example usage: _matplotlib_list(interval_list) and returns: xlist,  ylist