code: def uncomment(lines, prefix="#", suffix=""):
      """Remove prefix and space, or only prefix, when possible"""
      if prefix:
          prefix_and_space = prefix + " "
          length_prefix = len(prefix)
          length_prefix_and_space = len(prefix_and_space)
          lines = [
              line[length_prefix_and_space:]
              if line.startswith(prefix_and_space)
              else (
                  line[length_prefix:]
                  if line.startswith(prefix)
                  else line
              )
              for line in lines
          ]
  
      if suffix:
          space_and_suffix = " " + suffix
          length_suffix = len(suffix)
          length_space_and_suffix = len(space_and_suffix)
          lines = [
              line[:-length_space_and_suffix]
              if line.endswith(space_and_suffix)
              else (
                  line[:-length_suffix]
                  if line.endswith(suffix)
                  else line
              )
              for line in lines
          ]
  
      return lines
  
imports: import re
  import warnings
  from copy import copy
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell
  from packaging.version import parse
  from .doxygen import doxygen_to_markdown
  from .languages import _SCRIPT_EXTENSIONS
  from .cell_metadata import is_active, is_json_metadata, rmd_options_to_metadata, text_to_metadata
  from .languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER
  from .magics import is_magic, need_explicit_marker, uncomment_magic, unescape_code_start
  from .pep8 import pep8_lines_between_cells
  from .stringparser import StringParser
label_desc: Use image node_id 1 for calling a global function with example usage: uncomment(lines, prefix, suffix) and returns: lines