docstr: Update threshold by a value inferred from the percentage of instances considered to be
  outliers in a sample of the dataset.
  
  Parameters
  ----------
  X
      Batch of instances.
  outlier_type
      Predict outliers at the 'feature' or 'instance' level.
  outlier_perc
      Percentage of sorted feature level outlier scores used to predict instance level outlier.
  threshold_perc
      Percentage of X considered to be normal based on the outlier score.
  batch_size
      Batch size used when making predictions with the VAE.
docstr_tok: ["Update","threshold","by","a","value","inferred","from","the","percentage","of","instances","considered","to","be","outliers","in","a","sample","of","the","dataset",".","Parameters","--","--","--","--","--","X","Batch","of","instances",".","outlier_type","Predict","outliers","at","the","'feature","'","or","'instance","'","level",".","outlier_perc","Percentage","of","sorted","feature","level","outlier","scores","used","to","predict","instance","level","outlier",".","threshold_perc","Percentage","of","X","considered","to","be","normal","based","on","the","outlier","score",".","batch_size","Batch","size","used","when","making","predictions","with","the","VAE","."]
code: def infer_threshold(
      self,
      X: np.ndarray,
      outlier_type: str = "instance",
      outlier_perc: float = 100.0,
      threshold_perc: float = 95.0,
      batch_size: int = int(1e10),
  ) -> None:
      """
      Update threshold by a value inferred from the percentage of instances considered to be
      outliers in a sample of the dataset.
  
      Parameters
      ----------
      X
          Batch of instances.
      outlier_type
          Predict outliers at the 'feature' or 'instance' level.
      outlier_perc
          Percentage of sorted feature level outlier scores used to predict instance level outlier.
      threshold_perc
          Percentage of X considered to be normal based on the outlier score.
      batch_size
          Batch size used when making predictions with the VAE.
      """
      # compute outlier scores
      fscore, iscore = self.score(
          X, outlier_perc=outlier_perc, batch_size=batch_size
      )
      if outlier_type == "feature":
          outlier_score = fscore
      elif outlier_type == "instance":
          outlier_score = iscore
      else:
          raise ValueError(
              "`outlier_score` needs to be either `feature` or `instance`."
          )
  
      # update threshold
      self.threshold = np.percentile(outlier_score, threshold_perc)
  
imports: import logging
  import numpy
  import tensorflow
  import tensorflow_probability
  from typing import Dict, Tuple
  from alibi_detect.models.tensorflow.autoencoder import VAE
  from alibi_detect.models.tensorflow.trainer import trainer
  from alibi_detect.models.tensorflow.losses import elbo
  from alibi_detect.base import BaseDetector, FitMixin, ThresholdMixin, outlier_prediction_dict
  from alibi_detect.utils.tensorflow.prediction import predict_batch
  from alibi_detect.utils._types import OptimizerTF
label_desc: Use image node_id 3 for calling the OutlierVAE obj's underlying member method code with example usage: obj.infer_threshold(X, outlier_type, outlier_perc, threshold_perc, batch_size) without return types