def METHOD_NAME(project, id, query):
    """Create Test Run Template"""
    from pylero.test_run import TestRun
    LOG.info(f"Checking for testrun template '{id}'")
    try:
        # Create testrun template
        TestRun.create_template(
            project_id=project,
            template_id=id,
            select_test_cases_by=TEST_FILTER,
            query=query,
        )
        LOG.info(f"Testrun template '{id}' created successfully")
    except Exception as e:
        if "Most probably the TestRun with the same ID already exists." in str(e):
            LOG.info(f"Testrun template '{id}' already present")
            return
        msg = f"Falied to create testrun template {id} with error :\n{str(e)}"
        LOG.error(msg)
        raise Exception(msg)