parameters: (inst, is_ext_inst)
docstring: Returns the C initializer for the given SPIR-V instruction.
  
      Arguments:
        - inst: a dict containing information about a SPIR-V instruction
        - is_ext_inst: a bool indicating whether |inst| is an extended
                       instruction.
  
      Returns:
        a string containing the C initializer for spv_opcode_desc_t or
        spv_ext_inst_desc_t
docstring_summary: Returns the C initializer for the given SPIR-V instruction.
docstring_tokens: Returns the C initializer for the given SPIR - V instruction .
function: def generate_instruction(inst, is_ext_inst):
      """Returns the C initializer for the given SPIR-V instruction.
  
      Arguments:
        - inst: a dict containing information about a SPIR-V instruction
        - is_ext_inst: a bool indicating whether |inst| is an extended
                       instruction.
  
      Returns:
        a string containing the C initializer for spv_opcode_desc_t or
        spv_ext_inst_desc_t
      """
      opname = inst.get('opname')
      opcode = inst.get('opcode')
      caps = inst.get('capabilities', [])
      exts = inst.get('extensions', [])
      operands = inst.get('operands', {})
      operands = [(o['kind'], o.get('quantifier', '')) for o in operands]
      min_version = inst.get('version', None)
      max_version = inst.get('lastVersion', None)
  
      assert opname is not None
  
      if is_ext_inst:
          return str(ExtInstInitializer(opname, opcode, caps, operands))
      else:
          return str(InstInitializer(opname, caps, exts, operands, min_version, max_version))
function_tokens: def generate_instruction ( inst , is_ext_inst ) : opname = inst . get ( 'opname' ) opcode = inst . get ( 'opcode' ) caps = inst . get ( 'capabilities' , [ ] ) exts = inst . get ( 'extensions' , [ ] ) operands = inst . get ( 'operands' , { } ) operands = [ ( o [ 'kind' ] , o . get ( 'quantifier' , '' ) ) for o in operands ] min_version = inst . get ( 'version' , None ) max_version = inst . get ( 'lastVersion' , None ) assert opname is not None if is_ext_inst : return str ( ExtInstInitializer ( opname , opcode , caps , operands ) ) else : return str ( InstInitializer ( opname , caps , exts , operands , min_version , max_version ) )