code: def get_oncall_from_testfile(testfile: str) -> Union[List[str], None]:
      path = f"test/{testfile}"
      if not path.endswith(".py"):
          path += ".py"
      # get oncall on test file
      try:
          with open(path) as f:
              for line in f:
                  if line.startswith("# Owner(s): "):
                      possible_lists = re.findall(r"\[.*\]", line)
                      if len(possible_lists) > 1:
                          raise Exception("More than one list found")
                      elif len(possible_lists) == 0:
                          raise Exception(
                              "No oncalls found or file is badly formatted"
                          )
                      oncalls = ast.literal_eval(possible_lists[0])
                      return list(oncalls)
      except Exception as e:
          if "." in testfile:
              return [f"module: {testfile.split('.')[0]}"]
          else:
              return ["module: unmarked"]
      return None
  
file_path: pytorch/tools/stats/upload_test_stat_aggregates.py
imports: import argparse
  import ast
  import datetime
  import json
  import os
  import re
  from typing import Any, List, Union
  import rockset
  from tools.stats.upload_stats_lib import upload_to_s3
label_desc: Use image node_id 1 for calling a global function with example usage: get_oncall_from_testfile(testfile) and returns: None, list, list, list