class_docstr: Generate random syntactically-valid Python ASTs.
docstr: Generate an If node.
code: def generate_If(self):
      """Generate an If node."""
      test = self.generate_Compare()
  
      # Generate true branch statements
      body = self.sample_node_list(
          low=1,
          high=N_CONTROLFLOW_STATEMENTS // 2,
          generator=self.generate_statement,
      )
  
      # Generate false branch statements
      orelse = self.sample_node_list(
          low=1,
          high=N_CONTROLFLOW_STATEMENTS // 2,
          generator=self.generate_statement,
      )
  
      node = gast.If(test, body, orelse)
      return node
  
imports: import random
  import string
  import gast
  import numpy
  from nvidia.dali._autograph.pyct import gast_util
  from nvidia.dali._autograph.pyct import templates
label_desc: Use image node_id 10 for calling the CodeGenerator obj's underlying member method code with example usage: obj.generate_If() and returns: node