code: def count_leading_spaces(s):
      ws = re.search(r"\S", s)
      if ws:
          return ws.start()
      else:
          return 0
  
imports: from __future__ import print_function, unicode_literals
  import glob
  import inspect
  import os
  import re
  import shutil
  from spektral import data, datasets, layers, models, transforms, utils
label_desc: Use image node_id 8 for calling a global function with example usage: count_leading_spaces(s) and returns: ws, int