code: def _get_session(self, request):
          
          _session = requests.session()  # empty session
          
          response = _session.post(**request)
          logger.info('Using SMC API version: %s', self.api_version)
          
          if response.status_code != 200:
              raise SMCConnectionError(
                  'Login failed, HTTP status code: %s and reason: %s' % (
                      response.status_code, response.reason))
          return _session
docs: Authenticate the request dict
          
          :param dict request: request dict built from user input
          :raises SMCConnectionError: failure to connect
          :return: python requests session
          :rtype: requests.Session