def METHOD_NAME(self) -> Iterable[Metric]:
    stats.refresh_stats()
    g = GaugeMetricFamily(
        "jemalloc_stats_app_memory_bytes",
        "The stats reported by jemalloc",
        labels=["type"],
    )
    # Read the relevant global stats from jemalloc. Note that these may
    # not be accurate if python is configured to use its internal small
    # object allocator (which is on by default, disable by setting the
    # env `PYTHONMALLOC=malloc`).
    #
    # See the jemalloc manpage for details about what each value means,
    # roughly:
    #   - allocated ─ Total number of bytes allocated by the app
    #   - active ─ Total number of bytes in active pages allocated by
    #     the application, this is bigger than `allocated`.
    #   - resident ─ Maximum number of bytes in physically resident data
    #     pages mapped by the allocator, comprising all pages dedicated
    #     to allocator metadata, pages backing active allocations, and
    #     unused dirty pages. This is bigger than `active`.
    #   - mapped ─ Total number of bytes in active extents mapped by the
    #     allocator.
    #   - metadata ─ Total number of bytes dedicated to jemalloc
    #     metadata.
    for t in (
        "allocated",
        "active",
        "resident",
        "mapped",
        "metadata",
    ):
        try:
            value = stats.get_stat(t)
        except Exception as e:
            # There was an error fetching the value, skip.
            logger.warning("Failed to read jemalloc stats.%s: %s", t, e)
            continue
        g.add_metric([t], value=value)
    yield g