<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind(value, name):
 """A filter that prints %s, and stores the value in an array, so that it can be bound using a prepared statement This filter is automatically applied to every {{variable}} during the lexing stage, so developers can't forget to bind """

    if isinstance(value, Markup):
        return value
    elif requires_in_clause(value):
        raise MissingInClauseException("""Got a list or tuple. 
            Did you forget to apply '|inclause' to your query?""")
    else:
        return _bind_param(_thread_local.bind_params, name, value)