code: def get_embedding_size(n: int, max_size: int = 100) -> int:
      """
      Determine empirically good embedding sizes (formula taken from fastai).
      Args:
          n (int): number of classes
          max_size (int, optional): maximum embedding size. Defaults to 100.
      Returns:
          int: embedding size
      """
      if n > 2:
          return min(round(1.6 * n**0.56), max_size)
      else:
          return 1
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from darts.logging import get_logger
  from darts.utils.torch import MonteCarloDropout
label_desc: Use image node_id 1 for calling a global function with example usage: get_embedding_size(n, max_size) and returns: min, int