def testCheckAllFeaturesFiles(self):

    def CheckFileContent(path, json_data):

      def HasElement(e):
        if json_data.get(e) is None:
          self.fail('%s: is missing "%s"' % (path, e))
      HasElement('description')
      HasElement('releaseVersion')
      language = json_data.get('language')
      possible_environments = set(platforms.PLATFORMS[platforms.ALL])
      if language:
        for p in platforms.PLATFORMS.get(language, []):
          possible_environments.add(p)

      for r in json_data.get('requires', []):

        def HasRequiresElement(d, e):
          if d.get(e) is None:
            self.fail('%s: "requires" item is missing "%s"' % (path, e))
        HasRequiresElement(r, 'name')
        HasRequiresElement(r, 'version')
        HasRequiresElement(r, 'environments')
        environments = r['environments']
        for e in environments:
          if e not in possible_environments:
            self.fail('%s: bad environment list: %s in %s'
                      % (path, environments, r))
        for f in r.get('files', []):
          file_type = f['type']
          if file_type not in platforms.FILE_TYPES[platforms.ALL]:
            self.fail('%s: unknown file type %s in %s' % (path, file_type, r))

    for path in self.WalkFileTree(r'features\.json$'):
      json_data = self.LoadJsonFile(path, True)
      if json_data:
        CheckFileContent(path, json_data)
Make sure the features.json files obey the rules.
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/configuration_test.py/ConfigurationTest.testCheckAllFeaturesFiles