parameters: (workspace_name, workspace_id)
docstring: Check that a workspace has the given type
docstring_summary: Check that a workspace has the given type
docstring_tokens: Check that a workspace has the given type
function: def _hasWorkspaceID(workspace_name, workspace_id):
      """Check that a workspace has the given type"""
      workspace = AnalysisDataService.retrieve(workspace_name)
      if isinstance(workspace, WorkspaceGroup):
          return workspace[0].id() == workspace_id
      else:
          return workspace.id() == workspace_id
function_tokens: def _hasWorkspaceID ( workspace_name , workspace_id ) : workspace = AnalysisDataService . retrieve ( workspace_name ) if isinstance ( workspace , WorkspaceGroup ) : return workspace [ 0 ] . id ( ) == workspace_id else : return workspace . id ( ) == workspace_id