code: def num_ini_spaces(strng):
      """Return the number of initial spaces in a string"""
      warnings.warn(
          "`num_ini_spaces` is Pending Deprecation since IPython 8.17."
          "It is considered fro removal in in future version. "
          "Please open an issue if you believe it should be kept.",
          stacklevel=2,
          category=PendingDeprecationWarning,
      )
      ini_spaces = ini_spaces_re.match(strng)
      if ini_spaces:
          return ini_spaces.end()
      else:
          return 0
  
imports: import os
  import re
  import string
  import sys
  import textwrap
  import warnings
  from string import Formatter
  from pathlib import Path
  from typing import List, Union, Optional, Dict, Tuple
label_desc: Use image node_id 4 for calling a global function with example usage: num_ini_spaces(strng) and returns: ini_spaces, int