def METHOD_NAME(category: dict, bucket, test, stderr=None):
    record = test if not stderr else {"name": test, "output": stderr}
    if bucket not in category.keys():
        category[bucket] = [record]
    else:
        category[bucket].append(record)