code: def _get_workspace_from_name_and_shards(workspace, name, shard_id):
      if workspace:
          complete_workspace = os.path.join(workspace, name)
          if shard_id is not None and shard_id != -1:
              complete_workspace = os.path.join(
                  complete_workspace, str(shard_id)
              )
          if not os.path.exists(complete_workspace):
              os.makedirs(complete_workspace, exist_ok=True)
          return os.path.abspath(complete_workspace)
  
file_path: jina/jina/serve/helper.py
imports: import functools
  import inspect
  import os
  import typing
  from typing import Any, Dict, List, Optional, Tuple, Union
  import grpc
  from jina.helper import convert_tuple_to_list
  from contextlib import nullcontext
label_desc: Use image node_id 6 for calling a global function with example usage: _get_workspace_from_name_and_shards(workspace, name, shard_id) and returns: os