code: def patch_cursor(cursor, batch_size=None, limit=None, skip=None, sort=None, **kwargs):
    
  
    if type(batch_size) == int:
      cursor.batch_size(batch_size)
  
    if limit is not None:
      cursor.limit(limit)
  
    if sort is not None:
      cursor.sort(sort)
  
    if skip is not None:
      cursor.skip(skip)
docs: Adds batch_size, limit, sort parameters to a DB cursor