def METHOD_NAME(
    pg,
    host="localhost",
    port=constants.ISLAND_DEFAULT_REST_PORT,
    timeout=30,
    skip_deploy=False,
    session_id=None,
):
    """
    Submits a physical graph for execution. Additionally it waits until the
    graph has finished executing.
    """
    client = _get_client(host, port, timeout)
    session_id = session_id or "%f" % (time.time())
    completed_uids = droputils.get_roots(pg)
    with client:
        client.create_session(session_id)
        logger.info("Session %s created", session_id)
        client.append_graph(session_id, pg)
        logger.info("Graph for session %s appended", session_id)
        if not skip_deploy:
            client.deploy_session(session_id, completed_uids=completed_uids)
            logger.info("Session %s deployed", session_id)
    return session_id