code: def _get_workspace_id_from_name(
      session: api.Session, name: str
  ) -> int:
      """Workspace lookup from master that relies on a workspace name."""
      resp = bindings.get_GetWorkspaces(session=session, name=name)
      if len(resp.workspaces) == 0:
          raise errors.NotFoundException(
              f"No workspace found with name {name}"
          )
      assert (
          len(resp.workspaces) < 2
      ), f"Multiple workspaces found with name {name}"
  
      return resp.workspaces[0].id
  
file_path: determined/harness/determined/common/experimental/workspace.py
imports: import itertools
  from typing import Iterable, List, Optional
  from determined.common import api
  from determined.common.api import bindings, errors
  from determined.common.experimental import project, resource_pool
label_desc: Use image node_id 1 for calling a global function with example usage: _get_workspace_id_from_name(session, name) and returns: resp