human
Complete the below
def build_schema_test(name, schema, schema_store, failing_instances, passing_instances):

    ''''Create test case verifying that various instances pass and fail
    verification with a given JSON Schema.
    :param bytes name: Name of test case to create.
    :param dict schema: Schema to test.
    :param dict schema_store: The schema definitions.
    :param list failing_instances: Instances which should fail validation.
    :param list passing_instances: Instances which should pass validation.
    :returns: The test case.
a ``TestCase`` subclass.'
    '''
 Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    body = {'schema': schema, 'schema_store': schema_store, 'validator': getValidator(schema, schema_store), 'passing_instances': passing_instances, 'failing_instances': failing_instances}
    for error_type in failing_instances:
        for (i, inst) in enumerate(failing_instances[error_type]):
            def test(self, inst=inst, error_type=error_type):
                e = self.assertRaises(ValidationError, self.validator.validate, inst)
                self.assertEqual(e.validator, error_type)
            test.__name__ = ('test_fails_validation_%s_%d' % (error_type, i))
            body[test.__name__] = test
    for (i, inst) in enumerate(passing_instances):
        def test(self, inst=inst):
            self.validator.validate(inst)
        test.__name__ = ('test_passes_validation_%d' % (i,))
        body[test.__name__] = test
    return type(name, (TestCase, object), body)