code: def ensure_valid_protocol(protocol):
      if protocol not in ("https", "http"):
          raise InvalidProtocolException(
              "Invalid protocol: %s.  Protocol must be either http or https."
              % (protocol)
          )
  
imports: import pkgutil
  from typing import Tuple
  from scattertext.Common import DEFAULT_D3_URL, DEFAULT_D3_SCALE_CHROMATIC, DEFAULT_HTML_VIZ_FILE_NAME, AUTOCOMPLETE_CSS_FILE_NAME, SEARCH_FORM_FILE_NAME
  from scattertext.viz.ScatterplotStructure import InvalidProtocolException
label_desc: Use image node_id 1 for calling the ExternalJSUtilts obj's underlying member method code with example usage: obj.ensure_valid_protocol(protocol) without return types