code: def get_max_depth(doc):
      """Get the maximum parse tree depth.
  
      :param doc: The document to process.
      :type doc: spacy.tokens.doc.Doc
      :return: The maximum parse tree depth.
      :rtype: int
      """
      roots = []
      for each in doc.sents:
          roots.append(
              [token for token in each if token.head == token][0]
          )
  
      return max([get_parse_tree_depth(root) for root in roots])
  
file_path: responsible-ai-toolbox/responsibleai_text/responsibleai_text/utils/feature_extractors.py
imports: import re
  from typing import List, Optional, Union
  import pandas
  import spacy
  from negspacy.termsets import termset
  from tqdm import tqdm
  from nlp_feature_extractors import attribute_extractors
  from responsibleai_text.common.constants import ModelTask, QuestionAnsweringFields
label_desc: Use image node_id 8 for calling a global function with example usage: get_max_depth(doc) and returns: max