code: def remove_suffix(text, suffix):
      """
      Remove the suffix from the text if it exists.
  
      >>> remove_suffix('name.git', '.git')
      'name'
  
      >>> remove_suffix('something special', 'sample')
      'something special'
      """
      rest, suffix, null = text.partition(suffix)
      return rest
  
imports: import re
  import itertools
  import textwrap
  import functools
  from setuptools.extern.jaraco.functools import compose, method_cache
  from setuptools.extern.jaraco.context import ExceptionTrap
label_desc: Use image node_id 11 for calling a global function with example usage: remove_suffix(text, suffix) and returns: rest