def update_hash(a_hash, mv):
    """Adds ``mv`` to ``a_hash``

    Args:
       a_hash (`Hash`): the secure hash, e.g created by hashlib.md5
       mv (:class:`MetricValue`): the instance to add to the hash

    """
    if mv.labels:
        signing.add_dict_to_hash(a_hash, encoding.MessageToPyValue(mv.labels))
    money_value = mv.get_assigned_value(u'moneyValue')
    if money_value is not None:
        a_hash.update(b'\x00')
        a_hash.update(money_value.currencyCode.encode('utf-8'))
Adds ``mv`` to ``a_hash``

    Args:
       a_hash (`Hash`): the secure hash, e.g created by hashlib.md5
       mv (:class:`MetricValue`): the instance to add to the hash