code: def list_metrics(self, project, page_size=None, page_token=None):
          
          extra_params = {}
  
          if page_size is not None:
              extra_params["pageSize"] = page_size
  
          path = "/projects/%s/metrics" % (project,)
          return page_iterator.HTTPIterator(
              client=self._client,
              api_request=self._client._connection.api_request,
              path=path,
              item_to_value=_item_to_metric,
              items_key="metrics",
              page_token=page_token,
              extra_params=extra_params,
          )
docs: List metrics for the project associated with this client.
  
          See
          https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
  
          :type project: str
          :param project: ID of the project whose metrics are to be listed.
  
          :type page_size: int
          :param page_size: maximum number of metrics to return, If not passed,
                            defaults to a value set by the API.
  
          :type page_token: str
          :param page_token: opaque marker for the next "page" of metrics. If not
                             passed, the API will return the first page of
                             metrics.
  
          :rtype: :class:`~google.api_core.page_iterator.Iterator`
          :returns: Iterator of
                    :class:`~google.cloud.logging.metric.Metric`
                    accessible to the current API.