def get_attr(instance, name):
    """Get the value of an attribute from a given instance.

    :param instance: The instance.
    :type instance: object

    :param name: The attribute name.
    :type name: str

    """
    return getattr(instance, name)