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 collections import namedtuple
  from contextlib import redirect_stdout
  import inspect
  import os
  from typing import Any, Callable, Dict, List, Tuple, Union
  import lightning.pytorch
  import torch
  from torch import nn
  from torch.fft import irfft, rfft
  import torch.nn.functional
  from torch.nn.utils import rnn
label_desc: Use image node_id 4 for calling a global function with example usage: get_embedding_size(n, max_size) and returns: min, int