code: def start_of_chunk(
      prev_tag: str, tag: str, prev_type: str, type_: str
  ) -> bool:
      """Checks if a chunk started between the previous and current word.
      Args:
          prev_tag: previous chunk tag.
          tag: current chunk tag.
          prev_type: previous type.
          type_: current type.
      Returns:
          chunk_start: boolean.
      """
      chunk_start = False
  
      if tag == "B":
          chunk_start = True
      if tag == "S":
          chunk_start = True
  
      if prev_tag == "E" and tag == "E":
          chunk_start = True
      if prev_tag == "E" and tag == "I":
          chunk_start = True
      if prev_tag == "S" and tag == "E":
          chunk_start = True
      if prev_tag == "S" and tag == "I":
          chunk_start = True
      if prev_tag == "O" and tag == "E":
          chunk_start = True
      if prev_tag == "O" and tag == "I":
          chunk_start = True
  
      if tag != "O" and tag != "." and prev_type != type_:
          chunk_start = True
  
      return chunk_start
  
file_path: Kashgari/kashgari/metrics/sequence_labeling.py
imports: from collections import defaultdict
  from typing import List, Dict, Tuple, Any
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: start_of_chunk(prev_tag, tag, prev_type, type_) and returns: chunk_start