code: def dynkin_diagram(self):
      n = self.n
      diag = " " * 4 * (n - 3) + str(n - 1) + "\n"
      diag += " " * 4 * (n - 3) + "0\n"
      diag += " " * 4 * (n - 3) + "|\n"
      diag += " " * 4 * (n - 3) + "|\n"
      diag += "---".join("0" for i in range(1, n)) + "\n"
      diag += (
          "   ".join(str(i) for i in range(1, n - 1)) + "   " + str(n)
      )
      return diag
  
file_path: sympy/sympy/liealgebras/type_d.py
imports: from .cartan_type import Standard_Cartan
  from sympy.core.backend import eye
label_desc: Use image node_id 10 for calling the TypeD obj's underlying member method code with example usage: obj.dynkin_diagram() and returns: diag