def _invoke_setter_on(input_object, method_name, value):
    """ If a given input object has the given setter method
    name, use this method to set "value" on the object.

    :param input_object: Python object
    :param method_name: name of the setter method
    :param value: value to set
    """
    remove = '_' + type(input_object).__name__ + '__'
    real_method_name = method_name.replace(remove, '')
    setter_method = '_set_' + real_method_name
    if hasattr(input_object, setter_method):
        method = getattr(input_object, setter_method)
        method(value)
