<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_schema_mapping(resolver, schema_uri, depth=1):
 """ Try and recursively iterate a JSON schema and to generate an ES mapping that encasulates it. """

    visitor = SchemaVisitor({'$ref': schema_uri}, resolver)
    return _generate_schema_mapping(visitor, set(), depth)