code: def xypic_draw_diagram(
      diagram, masked=None, diagram_format="", groups=None, **hints
  ):
      r"""
      Provides a shortcut combining :class:`DiagramGrid` and
      :class:`XypicDiagramDrawer`.  Returns an Xy-pic presentation of
      ``diagram``.  The argument ``masked`` is a list of morphisms which
      will be not be drawn.  The argument ``diagram_format`` is the
      format string inserted after "\xymatrix".  ``groups`` should be a
      set of logical groups.  The ``hints`` will be passed directly to
      the constructor of :class:`DiagramGrid`.
  
      For more information about the arguments, see the docstrings of
      :class:`DiagramGrid` and ``XypicDiagramDrawer.draw``.
  
      Examples
      ========
  
      >>> from sympy.categories import Object, NamedMorphism, Diagram
      >>> from sympy.categories import xypic_draw_diagram
      >>> A = Object("A")
      >>> B = Object("B")
      >>> C = Object("C")
      >>> f = NamedMorphism(A, B, "f")
      >>> g = NamedMorphism(B, C, "g")
      >>> diagram = Diagram([f, g], {g * f: "unique"})
      >>> print(xypic_draw_diagram(diagram))
      \xymatrix{
      A \ar[d]_{g\circ f} \ar[r]^{f} & B \ar[ld]^{g} \\
      C &
      }
  
      See Also
      ========
  
      XypicDiagramDrawer, DiagramGrid
      """
      grid = DiagramGrid(diagram, groups, **hints)
      drawer = XypicDiagramDrawer()
      return drawer.draw(diagram, grid, masked, diagram_format)
  
imports: from sympy.categories import CompositeMorphism, IdentityMorphism, NamedMorphism, Diagram
  from sympy.core import Dict, Symbol, default_sort_key
  from sympy.printing.latex import latex
  from sympy.sets import FiniteSet
  from sympy.utilities.iterables import iterable
  from sympy.utilities.decorator import doctest_depends_on
  from itertools import chain
label_desc: Use image node_id 1 for calling a global function with example usage: xypic_draw_diagram(diagram, masked, diagram_format, groups) and returns: drawer