def _check_for_setattr(instance):
    """
    Check if there's any setattr method inside an instance. If so, return True.
    """
    module = instance.get_parent_until()
    try:
        stmts = module.used_names['setattr']
    except KeyError:
        return False

    return any(instance.start_pos < stmt.start_pos < instance.end_pos
               for stmt in stmts)