code: def gen_params_from_config(config_dict):
      
  
      if config_dict.get("count_bucket"):
          logger.warning("change your endpoint to the count endpoint; this is "
                         "default behavior when the count bucket "
                         "field is defined")
          endpoint = change_to_count_endpoint(config_dict.get("endpoint"))
      else:
          endpoint = config_dict.get("endpoint")
  
  
      def intify(arg):
          if not isinstance(arg, int) and arg is not None:
              return int(arg)
          else:
              return arg
  
      # this parameter comes in as a string when it's parsed
      results_per_call = intify(config_dict.get("results_per_call", None))
  
      rule = gen_rule_payload(pt_rule=config_dict["pt_rule"],
                              from_date=config_dict.get("from_date", None),
                              to_date=config_dict.get("to_date", None),
                              results_per_call=results_per_call,
                              count_bucket=config_dict.get("count_bucket", None))
  
      _dict = {"endpoint": endpoint,
               "username": config_dict.get("username"),
               "password": config_dict.get("password"),
               "bearer_token": config_dict.get("bearer_token"),
               "extra_headers_dict": config_dict.get("extra_headers_dict",None),
               "rule_payload": rule,
               "results_per_file": intify(config_dict.get("results_per_file")),
               "max_results": intify(config_dict.get("max_results")),
               "max_pages": intify(config_dict.get("max_pages", None))}
      return _dict
docs: Generates parameters for a ResultStream from a dictionary.