code: def cluster_application_statistics(self, state_list=None,
                                         application_type_list=None):
          
          path = '/ws/v1/cluster/appstatistics'
  
          # TODO: validate state argument
          states = ','.join(state_list) if state_list is not None else None
          if application_type_list is not None:
              application_types = ','.join(application_type_list)
          else:
              application_types = None
  
          loc_args = (
              ('states', states),
              ('applicationTypes', application_types))
          params = self.construct_parameters(loc_args)
  
          return self.request(path, **params)
docs: With the Application Statistics API, you can obtain a collection of
          triples, each of which contains the application type, the application
          state and the number of applications of this type and this state in
          ResourceManager context.
  
          This method work in Hadoop > 2.0.0
  
          :param list state_list: states of the applications, specified as a
              comma-separated list. If states is not provided, the API will
              enumerate all application states and return the counts of them.
          :param list application_type_list: types of the applications,
              specified as a comma-separated list. If application_types is not
              provided, the API will count the applications of any application
              type. In this case, the response shows * to indicate any
              application type. Note that we only support at most one
              applicationType temporarily. Otherwise, users will expect
              an BadRequestException.
          :returns: API response object with JSON data
          :rtype: :py:class:`yarn_api_client.base.Response`