code: def filter_outputs_from_example(docstring, **kwargs):
      """
      Removes the lines testing an output with the doctest syntax in a code sample when it's set to `None`.
      """
      for key, value in kwargs.items():
          if value is not None:
              continue
  
          doc_key = "{" + key + "}"
          docstring = re.sub(
              rf"\n([^\n]+)\n\s+{doc_key}\n", "\n", docstring
          )
  
      return docstring
  
file_path: transformers/src/transformers/utils/doc.py
imports: import functools
  import re
  import types
label_desc: Use image node_id 7 for calling a global function with example usage: filter_outputs_from_example(docstring) and returns: docstring