code: def state_vae(od: OutlierVAE) -> Dict:
      """
      OutlierVAE parameters to save.
  
      Parameters
      ----------
      od
          Outlier detector object.
      """
      state_dict = {
          "threshold": od.threshold,
          "score_type": od.score_type,
          "samples": od.samples,
          "latent_dim": od.vae.latent_dim,
          "beta": od.vae.beta,
      }
      return state_dict
  
imports: import logging
  import os
  from functools import partial
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import dill
  import tensorflow
  from tensorflow.keras.layers import Input, InputLayer
  from alibi_detect.ad import AdversarialAE, ModelDistillation
  from alibi_detect.cd import ChiSquareDrift, ClassifierDrift, KSDrift, MMDDrift, TabularDrift
  from alibi_detect.cd.tensorflow import UAE, HiddenOutput
  from alibi_detect.cd.tensorflow.classifier import ClassifierDriftTF
  from alibi_detect.cd.tensorflow.mmd import MMDDriftTF
  from alibi_detect.models.tensorflow import TransformerEmbedding
  from alibi_detect.od import LLR, IForest, Mahalanobis, OutlierAE, OutlierAEGMM, OutlierProphet, OutlierSeq2Seq, OutlierVAE, OutlierVAEGMM, SpectralResidual
  from alibi_detect.utils._types import Literal
  from alibi_detect.utils.tensorflow.kernels import GaussianRBF
  from alibi_detect.utils.missing_optional_dependency import MissingDependency
  from alibi_detect.utils.frameworks import Framework
label_desc: Use image node_id 16 for calling a global function with example usage: state_vae(od) and returns: state_dict