code: def strip_blank_lines(line):
      """Remove leading and trailing blank lines from a list of lines"""
      while line and not line[0].strip():
          del line[0]
      while line and not line[-1].strip():
          del line[-1]
      return line
  
imports: from collections import namedtuple
  from collections.abc import Mapping
  import copy
  import inspect
  import re
  import textwrap
  from statsmodels.tools.sm_exceptions import ParseError
label_desc: Use image node_id 2 for calling a global function with example usage: strip_blank_lines(line) and returns: line