code: def test_workspace_constructor_requires_exactly_one_of_id_or_name(
      standard_session: api.Session,
      single_item_workspaces: bindings.v1GetWorkspacesResponse,
  ) -> None:
      responses.get(
          f"{_MASTER}/api/v1/workspaces",
          json=single_item_workspaces.to_json(),
      )
  
      with pytest.raises(ValueError):
          workspace.Workspace(
              session=standard_session,
              workspace_id=1,
              workspace_name="foo",
          )
  
      with pytest.raises(ValueError):
          workspace.Workspace(session=standard_session)
  
      workspace.Workspace(session=standard_session, workspace_id=1)
      workspace.Workspace(
          session=standard_session, workspace_name="foo"
      )
  
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 5 for calling a global function with example usage: test_workspace_constructor_requires_exactly_one_of_id_or_name(standard_session, single_item_workspaces) without return types