code: def get_conn(host='', username=None, password=None, port=445):
      '''
      Get an SMB connection
      '''
      if HAS_IMPACKET and not HAS_SMBPROTOCOL:
          salt.utils.versions.warn_until(
              'Sodium',
              'Support of impacket has been depricated and will be '
              'removed in Sodium. Please install smbprotocol instead.'
          )
      if HAS_SMBPROTOCOL:
          log.info('Get connection smbprotocol')
          return _get_conn_smbprotocol(host, username, password, port=port)
      elif HAS_IMPACKET:
          log.info('Get connection impacket')
          return _get_conn_impacket(host, username, password, port=port)
      return Falsf get_conn(host='', username=None, password=None, port=445):
      '''
      Get an SMB connection
      '''
      if HAS_IMPACKET and not HAS_SMBPROTOCOL:
          salt.utils.versions.warn_until(
              'Sodium',
              'Support of impacket has been depricated and will be '
              'removed in Sodium. Please install smbprotocol instead.'
          )
      if HAS_SMBPROTOCOL:
          log.info('Get connection smbprotocol')
          return _get_conn_smbprotocol(host, username, password, port=port)
      elif HAS_IMPACKET:
          log.info('Get connection impacket')
          return _get_conn_impacket(host, username, password, port=port)
      return False
docs: Get an SMB connection