def METHOD_NAME(self, fp: IO[str], **kwargs) -> None:
    """
    This function mirrors the Python stdlib JSON module method
    `json.dump`. The root of the simulation is passed, and the JSON is
    output to the specified.
    Parameters
    ----------
    fp: IO[str]
        The Text IO stream to output the JSON to.
    **kwargs:
        Additional parameters to be passed to the ``json.dump`` method.
    Usage
    -----
    ```
    import m5.pystats.gem5stats as gem5stats
    simstat = gem5stats.get_simstat(root)
    with open("test.json") as f:
        simstat.dump(fp=f, indent=6)
    ```
    The above will dump the json output to the 'test.json' file. The
    indentation will be of 6 (by default the indentation is 4).
    """
    # Setting the default indentation to something readable.
    if "indent" not in kwargs:
        kwargs["indent"] = 4
    json.METHOD_NAME(obj=self.to_json(), fp=fp, **kwargs)