parameters: (request)
return_statement: return args
docstring: Retrieves pagination arguments from the given Flask request object. Supports
       `offset`, `page`, and `limit` arguments, with offset and page being exclusive.
      :param request: Flask request object
      :return: pagination arguments
docstring_summary: Retrieves pagination arguments from the given Flask request object. Supports
       `offset`, `page`, and `limit` arguments, with offset and page being exclusive.
      :param request: Flask request object
      :return: pagination arguments
docstring_tokens: Retrieves pagination arguments from the given Flask request object . Supports offset page and limit arguments with offset and page being exclusive . : param request : Flask request object : return : pagination arguments
function: def get_pagination_args(request):
      """ Retrieves pagination arguments from the given Flask request object. Supports
       `offset`, `page`, and `limit` arguments, with offset and page being exclusive.
      :param request: Flask request object
      :return: pagination arguments
      """
      args = {}
  
      for arg_name in ('offset', 'page', 'limit'):
          if arg_name in request.args:
  
              try:
                  arg_value = int(request.args[arg_name]) if request.args[arg_name] != "" else 0
                  if arg_value < 0:
                      raise ValueError()
                  args[arg_name] = arg_value
              except ValueError:
                  raise ArgumentError("Invalid " + arg_name, 400)
  
      if 'offset' in args and 'page' in args:
          raise ArgumentError("Offset and page parameters can not be combined.", 400)
  
      for arg_name in ('before', 'after'):
          if request.args.get(arg_name):
              try:
                  args[arg_name] = int(request.args[arg_name])
              except ValueError():
                  raise ArgumentError("Invalid {} parameter".format(arg_name), 400)
      return args
function_tokens: def get_pagination_args ( request ) : args = { } for arg_name in ( 'offset' , 'page' , 'limit' ) : if arg_name in request . args : try : arg_value = int ( request . args [ arg_name ] ) if request . args [ arg_name ] != "" else 0 if arg_value < 0 : raise ValueError ( ) args [ arg_name ] = arg_value except ValueError : raise ArgumentError ( "Invalid " + arg_name , 400 ) if 'offset' in args and 'page' in args : raise ArgumentError ( "Offset and page parameters can not be combined." , 400 ) for arg_name in ( 'before' , 'after' ) : if request . args . get ( arg_name ) : try : args [ arg_name ] = int ( request . args [ arg_name ] ) except ValueError ( ) : raise ArgumentError ( "Invalid {} parameter" . format ( arg_name ) , 400 ) return args