code: def test_XypicDiagramDrawer_line():
      # A linear diagram.
      A = Object("A")
      B = Object("B")
      C = Object("C")
      D = Object("D")
      E = Object("E")
  
      f = NamedMorphism(A, B, "f")
      g = NamedMorphism(B, C, "g")
      h = NamedMorphism(C, D, "h")
      i = NamedMorphism(D, E, "i")
      d = Diagram([f, g, h, i])
      grid = DiagramGrid(d, layout="sequential")
      drawer = XypicDiagramDrawer()
      assert (
          drawer.draw(d, grid) == "\\xymatrix{\n"
          "A \\ar[r]^{f} & B \\ar[r]^{g} & C \\ar[r]^{h} & D \\ar[r]^{i} & E \n"
          "}\n"
      )
  
      # The same diagram, transposed.
      grid = DiagramGrid(d, layout="sequential", transpose=True)
      drawer = XypicDiagramDrawer()
      assert (
          drawer.draw(d, grid) == "\\xymatrix{\n"
          "A \\ar[d]^{f} \\\\\n"
          "B \\ar[d]^{g} \\\\\n"
          "C \\ar[d]^{h} \\\\\n"
          "D \\ar[d]^{i} \\\\\n"
          "E \n"
          "}\n"
      )
  
file_path: sympy/sympy/categories/tests/test_drawing.py
imports: from sympy.categories.diagram_drawing import _GrowableGrid, ArrowStringDescription
  from sympy.categories import DiagramGrid, Object, NamedMorphism, Diagram, XypicDiagramDrawer, xypic_draw_diagram
  from sympy.sets.sets import FiniteSet
label_desc: Use image node_id 5 for calling a global function with example usage: test_XypicDiagramDrawer_line() without return types