def is_from_parent(cls, attribute_name, value=None):
    """
    Tests if the current attribute value is shared by a parent of the given
    class.

    Returns None if the attribute value is None.

    :param cls: Child class with the requested attribute
    :param attribute_name: Name of the attribute to be tested
    :param value: The exact value in the child class (optional)
    :return: True if the attribute value is shared with a parent class
    """
    if value is None:
        try:
            value = getattr(cls, attribute_name)
        except AttributeError:
            return False
    for base in cls.__bases__:
        try:
            return getattr(base, attribute_name) is value
        except AttributeError:
            pass
    return False
