code: def metric_names(self, application_id, host_id, name=None, page=None):
          
          params = [
              'name={0}'.format(name) if name else None,
              'page={0}'.format(page) if page else None
          ]
          return self._get(
              url='{root}applications/{application_id}/hosts/{host_id}/metrics.json'.format(
                  root=self.URL,
                  application_id=application_id,
                  host_id=host_id
              ),
              headers=self.headers,
              params=self.build_param_string(params)
          )
docs: Return a list of known metrics and their value names for the given resource.
  
          :type application_id: int
          :param application_id: Application ID
  
          :type host_id: int
          :param host_id: Application Host ID
  
          :type name: str
          :param name: Filter metrics by name
  
          :type page: int
          :param page: Pagination index
  
          :rtype: dict
          :return: The JSON response of the API, with an additional 'pages' key
              if there are paginated results
  
          ::
  
              {
                  "metrics": [
                      {
                          "name": "string",
                          "values": [
                              "string"
                          ]
                      }
                  ],
                  "pages": {
                      "last": {
                          "url": "https://api.newrelic.com/v2/\
  applications/{application_id}/hosts/{host_id}/metrics.json?page=2",
                          "rel": "last"
                      },
                      "next": {
                          "url": "https://api.newrelic.com/v2/\
  applications/{application_id}/hosts/{host_id}/metrics.json?page=2",
                          "rel": "next"
                      }
                  }
              }