code: def enrich_by_object_type(request, json, fun, object_type, skip_nested=False, **kwargs):
      
      if not isinstance(object_type, list):
          object_type = [object_type]
      predicate = lambda x: 'object_type' in x and x['object_type'] in object_type
      return enrich_by_predicate(request, json, fun, predicate, skip_nested=skip_nested, **kwargs)
docs: Take the JSON, find its subparts having the given object part and transform
      them by the given function. Other key-word arguments are passed to the function.
  
      .. testsetup::
  
          from pprint import pprint
          from proso.django.enrichment import enrich_by_object_type
          request = None
  
      .. testcode::
  
          def enricher(request, json_list, nested):
              for json_object in json_list:
                  json_object['enriched'] = True
  
          enriched = enrich_by_object_type(
              request,
              [{'object_type': 'example_1'}, {'object_type': 'example_2'}],
              enricher,
              ['example_1']
          )
  
          pprint(enriched)
  
      .. testoutput::
  
          [{'enriched': True, 'object_type': 'example_1'}, {'object_type': 'example_2'}]
  
      Args:
          request (django.http.request.HttpRequest): request which is currently processed
          json (list|dict): in-memory representation of JSON
          fun: function which is be applied on found objects
          object_type(str|list): object type or list of object types
          skip_nested: ignore nested objects
  
      Returns:
          list|dict: transformed JSON