code: def test_valid_number_literals(self):
      for literal in VALID_UNDERSCORE_LITERALS:
          for i, expression in enumerate(
              ["%s", "1 + %s", "%s + 1", "2 * %s", "%s * 2"]
          ):
              code = "x = " + expression % literal
              node = self.fragment(
                  """\
                      # cython: language_level=3
                      """
                  + code
              ).root
              assert node is not None
  
              literal_node = node.stats[
                  0
              ].rhs  # StatListNode([SingleAssignmentNode('x', expr)])
              if i > 0:
                  # Add/MulNode() -> literal is first or second operand
                  literal_node = (
                      literal_node.operand2
                      if i % 2
                      else literal_node.operand1
                  )
              if "j" in literal or "J" in literal:
                  assert isinstance(literal_node, ExprNodes.ImagNode)
              elif (
                  "." in literal
                  or "e" in literal
                  or "E" in literal
                  and not ("0x" in literal or "0X" in literal)
              ):
                  assert isinstance(literal_node, ExprNodes.FloatNode)
              else:
                  assert isinstance(literal_node, ExprNodes.IntNode)
  
file_path: catboost/contrib/tools/cython/Cython/Compiler/Tests/TestGrammar.py
imports: from __future__ import absolute_import
  from ...TestUtils import CythonTest
  from ..Errors import CompileError
  from ..None import ExprNodes
label_desc: Use image node_id 2 for calling the TestGrammar obj's underlying member method code with example usage: obj.test_valid_number_literals() without return types