code: def test_workspace_constructor_populates_id_from_name(
      standard_session: api.Session,
      single_item_workspaces: bindings.v1GetWorkspacesResponse,
  ) -> None:
      workspace_id = 1
      workspace_name = "foo"
      single_item_workspaces.workspaces[0].id = workspace_id
      single_item_workspaces.workspaces[0].name = workspace_name
      responses.get(
          f"{_MASTER}/api/v1/workspaces",
          json=single_item_workspaces.to_json(),
      )
  
      ws = workspace.Workspace(
          session=standard_session, workspace_name=workspace_name
      )
      assert ws.id == workspace_id
  
file_path: determined/harness/tests/determined/common/experimental/test_workspace.py
imports: import pytest
  import responses
  from determined.common import api
  from determined.common.api import bindings, errors
  from determined.common.experimental import workspace
  from tests.fixtures import api_responses
label_desc: Use image node_id 7 for calling a global function with example usage: test_workspace_constructor_populates_id_from_name(standard_session, single_item_workspaces) without return types