<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sanitize_resource_schema(r):
 """Sanitize table schema for increased compatibility Up to version 0.9.0 jsontableschema did not support year, yearmonth and duration field types https://github.com/frictionlessdata/jsontableschema-py/pull/152 :param r: """

    if 'schema' in r.descriptor:
        r.descriptor['schema'] = _sanitize_schema(r.descriptor['schema'])

    return r