def generate_code(self):
    """
    Generate code for this class. Generated code contains the class declaration,
    and code for all the member methods.

    Returns:
      A formatted string consisting of well-formed Python code for this class.
    """
    print 'Generating code for the', self.name, 'class...'
    pcg = PythonCodeGenerator()
    pcg.begin(tab='  ')
    signature = 'class ' + self.name
    if self.super_class:
      signature += '(' + self.super_class + ')'
    signature += ':'
    pcg.writeln(signature)
    if len(self.methods):
      for i in range(0, len(self.methods)):
        if i == 0:
          pcg.writeln()
        self.methods[i].generate_code(pcg)
    else:
      # If the class has no methods, simply generate a class body with a single
      # 'pass' statement.
      pcg.indent()
      pcg.writeln('pass')
      pcg.dedent()
    return pcg.end()
dataset/ETHPy150Open hiranya911/rest-coder/python-lib/codegen_core.py/Class.generate_code/operator `>` -> `==`