def get_model(test):
    """Get the model name from a test method"""
    test = test.split("::")[0]
    if test.startswith("tests/models/"):
        test = test.split("/")[2]
    else:
        test = None

    return test
Get the model name from a test method
dpkd/transformers/utils/get_ci_error_statistics.py