code: def _modify_head_flat(heads: List[Token]) -> List[Token]:
      s = [t for t in heads]
      for i, t in enumerate(s):
          if not t.tag_.startswith("接頭辞"):
              continue
          x = [u for u in t.rights]  # type: ignore
          if len(x) == 0:
              continue
          h = x[0]
          if t.pos == NOUN and h.dep_ == "flat":
              d = "compound"
          elif t.pos == ADV and h.dep_ == "aux":
              d = "advmod"
              h.pos = VERB
          elif t.pos == PART and h.dep_ == "aux":
              d = "advmod"
              h.pos = ADJ
          else:
              continue
          h.head = t.head
          h.dep_ = t.dep_
          x = x[1:] + [u for u in t.lefts]  # type: ignore
          x += [t, h] if h.dep_ == "ROOT" else [t]
          x += [u for u in s if u.head == t]
          for u in x:
              u.head = h
          t.dep_ = d
          s[i] = h
      return s
  
file_path: camphr/packages/camphr_knp/camphr_knp/dependency_parser.py
imports: from typing import Any, Dict, Iterable, Optional, List
  import spacy
  from spacy.symbols import ADJ, ADP, ADV, AUX, CCONJ, DET, NOUN, NUM, PART, PRON, PUNCT, VERB
  from spacy.tokens import Doc, Span, Token
  from camphr_knp import KNP_USER_KEYS
label_desc: Use image node_id 7 for calling a global function with example usage: _modify_head_flat(heads) and returns: s