def METHOD_NAME(self, fname: str, custom_encoders: List[Callable] = None) -> None:
    """Exports :class:`JaxObject` instance to .hdf5 file.
    Parameters
    ----------
    fname : str
        Full path to the .hdf5 file to save the :class:`JaxObject` to.
    custom_encoders : List[Callable]
        List of functions accepting (fname: str, group_path: str, value: Any) that take
        the ``value`` supplied and write it to the hdf5 ``fname`` at ``group_path``.
    Example
    -------
    >>> simulation.to_hdf5(fname='folder/sim.hdf5') # doctest: +SKIP
    """
    def data_array_encoder(fname: str, group_path: str, value: Any) -> None:
        """Custom encoder to convert the JaxDataArray dict to an instance."""
        if isinstance(value, dict) and "type" in value and value["type"] == "JaxDataArray":
            data_array = JaxDataArray(values=value["values"], coords=value["coords"])
            data_array.METHOD_NAME(fname=fname, group_path=group_path)
    if custom_encoders is None:
        custom_encoders = []
    custom_encoders += [data_array_encoder]
    return super().METHOD_NAME(fname=fname, custom_encoders=custom_encoders)