def AnnotateMethod(self, unused_api, method, resource=None):
    for param in method.parameters:
      self._SetTypeHint(param)

    if method.parameters or method.values.get('requestType'):
      method.SetTemplateValue('hasParams', True)
    method.SetTemplateValue('name', self._ToMethodName(method.values, resource))
Just make sure finalize is never called after processing data.
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/php_generator.py/PHPGenerator.AnnotateMethod--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/test/mapreduce/output_writers_test.py/GCSOutputConsistentOutputWriterTest.testFinalizeChecksForErrors