def script_with_queue_path(tmpdir):
    """
    Pytest fixture to return a path to a script with main() which takes
    a queue and procedure as arguments and adds procedure process ID to queue.
    """
    path = tmpdir.join("script_with_queue.py")

    path.write(
        """
def main(queue, procedure):
    queue.put(procedure.pid)
"""
    )
    return f"file://{str(path)}"