code: def num_ini_spaces(s):
      """Return the number of initial spaces in a string.
  
      Note that tabs are counted as a single space.  For now, we do *not* support
      mixing of tabs and spaces in the user's input.
  
      Parameters
      ----------
      s : string
  
      Returns
      -------
      n : int
      """
      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(s)
      if ini_spaces:
          return ini_spaces.end()
      else:
          return 0
  
imports: from warnings import warn
  import ast
  import codeop
  import io
  import re
  import sys
  import tokenize
  import warnings
  from typing import List, Tuple, Union, Optional
  from types import CodeType
  from IPython.core.inputtransformer import leading_indent, classic_prompt, ipy_prompt, cellmagic, assemble_logical_lines, help_end, escaped_commands, assign_from_magic, assign_from_system, assemble_python_lines
  from IPython.utils import tokenutil
  from IPython.core.inputtransformer import ESC_SHELL, ESC_SH_CAP, ESC_HELP, ESC_HELP2, ESC_MAGIC, ESC_MAGIC2, ESC_QUOTE, ESC_QUOTE2, ESC_PAREN, ESC_SEQUENCES
label_desc: Use image node_id 1 for calling a global function with example usage: num_ini_spaces(s) and returns: ini_spaces, int