code: def metrics(self, name):
          
          return [
              MetricStub(
                  ensure_unicode(stub.name),
                  stub.type,
                  stub.value,
                  normalize_tags(stub.tags),
                  ensure_unicode(stub.hostname),
              )
              for stub in self._metrics.get(to_string(name), [])
          ]
docs: Return the metrics received under the given name