code: def tokenize(text):
      # Split by whitespace, force lowercase
      tokens = []
      token_ranges = []
  
      def add_token(text, start, end):
          token = text[start:end]
          if token:
              tokens.append(token)
              token_ranges.append((start, end))
  
      start = 0
      text = text
      for sep in re.finditer(r"\s+", text):
          add_token(text, start, sep.start())
          start = sep.end()
      add_token(text, start, len(text))
  
      if not tokens:
          # Add PAD_TOKEN in case of empty text
          tokens = ["<pad>"]
      tokens = list(map(str.lower, tokens))
  
      return tokens, token_ranges
  
imports: import re
  import numpy
  from caffe2.python import workspace
  from caffe2.python.predictor import predictor_exporter
label_desc: Use image node_id 1 for calling a global function with example usage: tokenize(text) and returns: tokens,  token_ranges