def set_precision_provider(precision_provider):
    """
    Set precision provider for Money instances.

    Default precision provider is
    `shuup.utils.babel_precision_provider.get_precision`.

    :type precision_provider: Callable[[str], decimal.Decimal|None]
    :param precision_provider:
      Function which will return precision for given currency code, or
      None for unhandled currency codes, e.g. ``func('USD')`` could
      return ``Decimal('0.01')``.
    """
    assert callable(precision_provider)
    global _precision_provider
    _precision_provider = precision_provider
