def METHOD_NAME(
    adata_field_cls: AnnDataField, preregister_fn: Optional[Callable] = None
) -> AnnDataField:
    """Wraps an AnnDataField with :class:`~scvi.data.fields.BaseMuDataWrapperClass`.
    Parameters
    ----------
    adata_field_cls
        AnnDataField class to wrap.
    preregister_fn
        Function that will be called at the beginning of :meth:`~scvi.data.fields.BaseMuDataWrapperClass.register_field`
        and :meth:`~scvi.data.fields.BaseMuDataWrapperClass.transfer_field`.
    """
    if not isinstance(adata_field_cls, type):
        raise ValueError("`adata_field_cls` must be a class, not an instance.")
    def mudata_field_init(
        self, *args, mod_key: Optional[str] = None, mod_required: bool = False, **kwargs
    ):
        BaseMuDataWrapperClass.__init__(
            self, mod_key=mod_key, mod_required=mod_required
        )
        self._adata_field = adata_field_cls(*args, **kwargs)
        if preregister_fn is not None:
            self._preregister = preregister_fn
    return type(
        f"MuData{adata_field_cls.__name__}",
        (BaseMuDataWrapperClass,),
        {
            "__init__": mudata_field_init,
        },
    )