code: def _get_prefix_suffix_docs(is_prefix: bool):
      if is_prefix:
          action, pos = "prefix", "before"
          r_action = "suffix"
      else:
          action, pos = "suffix", "after"
          r_action = "prefix"
  
      def mk_col(ch: str, s: str):
          return f"{ch}_{s}" if is_prefix else f"{s}_{ch}"
  
      doc = f"""
      {action.capitalize()} labels with string `{action}`.
  
      For Series, the row labels are {action}ed.
      For DataFrame, the column labels are {action}ed.
  
      Parameters
      ----------
      {action} : str
          The string to add {pos} each label.
  
      Returns
      -------
      Series or DataFrame
          New Series or DataFrame with updated labels.
  
      See Also
      --------
      Series.add_{r_action}: Suffix row labels with string `{r_action}`.
      DataFrame.add_{r_action}: Suffix column labels with string `{r_action}`.
  
      Examples
      --------
      >>> import mars.dataframe as md
      >>> s = md.Series([1, 2, 3, 4])
      >>> s.execute()
      0    1
      1    2
      2    3
      3    4
      dtype: int64
  
      >>> s.add_prefix({mk_col('item', '')!r}).execute()
      {mk_col('item', '0')}    1
      {mk_col('item', '1')}    2
      {mk_col('item', '2')}    3
      {mk_col('item', '3')}    4
      dtype: int64
  
      >>> df = md.DataFrame({{'A': [1, 2, 3, 4], 'B': [3, 4, 5, 6]}})
      >>> df.execute()
         A  B
      0  1  3
      1  2  4
      2  3  5
      3  4  6
  
      >>> df.add_prefix({mk_col('col', '')!r}).execute()
           {mk_col('col', 'A')}  {mk_col('col', 'B')}
      0        1      3
      1        2      4
      2        3      5
      3        4      6
      """
      return textwrap.dedent(doc).strip()
  
imports: import textwrap
  from functools import partial
label_desc: Use image node_id 1 for calling a global function with example usage: _get_prefix_suffix_docs(is_prefix) and returns: textwrap, unknown