code: def sanitize_resource_schema(r):
      
      if 'schema' in r.descriptor:
          r.descriptor['schema'] = _sanitize_schema(r.descriptor['schema'])
  
      return r
docs: 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: