code: async def modify(self, **kwargs):
          '''
          Corresponds to PATCH request with a resource identifier, modifying a single document in the database
          '''
          try:
              pk = self.pk_type(kwargs['pk'])
              # modify is a class method on MongoCollectionMixin
              result = await self._meta.object_class.modify(self.db, key=pk, data=self.data)
              if result is None:
                  raise NotFound('Object matching the given {} was not found'.format(self.pk))
              return await result.serialize()
          except Exception as ex:
              logger.exception(ex)
              raise BadRequest(exync def modify(self, **kwargs):
          '''
          Corresponds to PATCH request with a resource identifier, modifying a single document in the database
          '''
          try:
              pk = self.pk_type(kwargs['pk'])
              # modify is a class method on MongoCollectionMixin
              result = await self._meta.object_class.modify(self.db, key=pk, data=self.data)
              if result is None:
                  raise NotFound('Object matching the given {} was not found'.format(self.pk))
              return await result.serialize()
          except Exception as ex:
              logger.exception(ex)
              raise BadRequest(ex)
docs: Corresponds to PATCH request with a resource identifier, modifying a single document in the database