def METHOD_NAME(site=None):
    """
    Initialize to the prior mean. For priors with no `.mean` property implemented,
    we defer to the :func:`init_to_median` strategy.
    """
    if site is None:
        return partial(METHOD_NAME)
    if (
        site["type"] == "sample"
        and not site["is_observed"]
        and not site["fn"].support.is_discrete
    ):
        if site["value"] is not None:
            warnings.warn(
                f"init_to_mean() skipping initialization of site '{site['name']}'"
                " which already stores a value.",
                stacklevel=find_stack_level(),
            )
            return site["value"]
        try:
            # Try .mean property.
            value = site["fn"].mean
            sample_shape = site["kwargs"].get("sample_shape")
            if sample_shape:
                value = jnp.broadcast_to(value, sample_shape + jnp.shape(value))
        except (NotImplementedError, ValueError):
            return init_to_median(site)