code: def _count_locs(lines):
      loc = 0
      string_open = False
      for line in lines:
          line = line.strip()
          if not line or line.startswith("#"):
              continue
          if not string_open:
              if not line.startswith('"""'):
                  loc += 1
              else:
                  if not line.endswith('"""'):
                      string_open = True
          else:
              if line.startswith('"""'):
                  string_open = False
      return loc
  
file_path: autokeras/docs/tutobooks.py
imports: import json
  import os
  import random
  import shutil
  import sys
  from pathlib import Path
label_desc: Use image node_id 6 for calling a global function with example usage: _count_locs(lines) and returns: loc