<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_swagger12_handler(schema):
 """Builds a swagger12 handler or returns None if no schema is present. :type schema: :class:`pyramid_swagger.model.SwaggerSchema` :rtype: :class:`SwaggerHandler` or None """

    if schema:
        return SwaggerHandler(
            op_for_request=schema.validators_for_request,
            handle_request=handle_request,
            handle_response=validate_response,
        )