code: def num_ini_spaces(strng):
      """Return the number of initial spaces in a string"""
  
      ini_spaces = ini_spaces_re.match(strng)
      if ini_spaces:
          return ini_spaces.end()
      else:
          return 0
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import textwrap
  from string import Formatter
  from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
  from IPython.utils import py3compat
label_desc: Use image node_id 4 for calling a global function with example usage: num_ini_spaces(strng) and returns: ini_spaces, int