code: def mask_requests_args(
      url, validating=False, params_checker=None, **kwargs
  ):
      requests_kwargs = {
          key: val
          for (key, val) in iteritems(kwargs)
          if key in ALLOWED_REQUESTS_KWARGS
      }
      if params_checker is not None:
          url, s_params = params_checker(url)
          if s_params:
              if "params" in requests_kwargs:
                  requests_kwargs["params"].update(s_params)
              else:
                  requests_kwargs["params"] = s_params
  
      # Giving the connection 30 seconds. This timeout does not
      # apply to the download of the response body.
      # (Note that Quandl links can take >10 seconds to return their
      # first byte on occasion)
      requests_kwargs["timeout"] = 1.0 if validating else 30.0
      requests_kwargs.update(SHARED_REQUESTS_KWARGS)
  
      request_pair = namedtuple(
          "RequestPair", ("requests_kwargs", "url")
      )
      return request_pair(requests_kwargs, url)
  
imports: from abc import ABCMeta, abstractmethod
  from collections import namedtuple
  import hashlib
  from textwrap import dedent
  import warnings
  from logbook import Logger
  import numpy
  import pandas
  from pandas import read_csv
  import pytz
  import requests
  from six import StringIO, iteritems, with_metaclass
  from zipline.errors import MultipleSymbolsFound, SymbolNotFound, ZiplineError
  from zipline.protocol import DATASOURCE_TYPE, Event
  from zipline.assets import Equity
label_desc: Use image node_id 2 for calling a global function with example usage: mask_requests_args(url, validating, params_checker) and returns: request_pair