code: def gen_stats(base_path="."):
      table = []
      for path, _, files in os.walk(
          os.path.join(base_path, "tinygrad")
      ):
          for name in files:
              if not name.endswith(".py"):
                  continue
              filepath = os.path.join(path, name)
              relfilepath = os.path.relpath(filepath, base_path)
              with tokenize.open(filepath) as file_:
                  tokens = [
                      t
                      for t in tokenize.generate_tokens(file_.readline)
                      if t.type in TOKEN_WHITELIST
                  ]
                  token_count, line_count = len(tokens), len(
                      set(
                          [
                              x
                              for t in tokens
                              for x in range(t.start[0], t.end[0] + 1)
                          ]
                      )
                  )
                  table.append(
                      [
                          relfilepath,
                          line_count,
                          token_count / line_count,
                      ]
                  )
      return table
  
imports: import os, sys
  import token
  import tokenize
  import itertools
  from tabulate import tabulate
label_desc: Use image node_id 1 for calling a global function with example usage: gen_stats(base_path) and returns: table