code: def _instantiate_session(self, method_name, proxy=None, *args, **kwargs):
          
          if 'manager' in kwargs:
              session_class = getattr(kwargs['manager'], method_name)
              del kwargs['manager']
          else:
              session_class = getattr(self._provider_manager, method_name)
          if proxy is None:
              try:
                  return session_class(bank_id=self._catalog_id, *args, **kwargs)
              except AttributeError:
                  return session_class(*args, **kwargs)
          else:
              try:
                  return session_class(bank_id=self._catalog_id, proxy=proxy, *args, **kwargs)
              except AttributeError:
                  return session_class(proxy=proxy, *args, **kwargs)
docs: Instantiates a provider session