code: def get_device_name() -> Literal["mps", "cuda", "cpu"]:
      """
      Returns the name of the device where this module is running on.
      It's simple implementation that doesn't cover cases when more powerful GPUs are available and
      not a primary device ('cuda:0') or MPS device is available, but not configured properly:
      https://pytorch.org/docs/master/notes/mps.html
  
      :return: Device name, like 'cuda' or 'cpu'
      """
      if torch.cuda.is_available():
          return "cuda"
      elif torch.backends.mps.is_available():
          return "mps"
      else:
          return "cpu"
  
imports: import json
  import logging
  import os
  import shutil
  from collections import OrderedDict
  import warnings
  from typing import List, Dict, Tuple, Iterable, Type, Union, Callable, Optional, Literal, TYPE_CHECKING
  import numpy
  from numpy import ndarray
  import transformers
  from huggingface_hub import HfApi
  import torch
  from torch import nn, Tensor, device
  from torch.optim import Optimizer
  from torch.utils.data import DataLoader
  import torch.multiprocessing
  from tqdm.autonotebook import trange
  import math
  import queue
  import tempfile
  from .None import __MODEL_HUB_ORGANIZATION__
  from .evaluation import SentenceEvaluator
  from .util import import_from_string, batch_to_device, fullname, is_sentence_transformer_model, load_dir_path, load_file_path, save_to_hub_args_decorator
  from .models import Transformer, Pooling
  from .model_card_templates import ModelCardTemplate
  from .None import __version__
label_desc: Use image node_id 1 for calling a global function with example usage: get_device_name() and returns: str, str, str