code: def get_logp(
      dim_feature_vector: int, p_u: Tensor, logdet_j: Tensor
  ) -> Tensor:
      """Returns the log likelihood estimation.
  
      Args:
          dim_feature_vector (int): Dimensions of the condition vector
          p_u (Tensor): Random variable u
          logdet_j (Tensor): log of determinant of jacobian returned from the invertable decoder
  
      Returns:
          Tensor: Log probability
      """
      ln_sqrt_2pi = -np.log(np.sqrt(2 * np.pi))  # ln(sqrt(2*pi))
      logp = (
          dim_feature_vector * ln_sqrt_2pi
          - 0.5 * torch.sum(p_u**2, 1)
          + logdet_j
      )
      return logp
  
file_path: anomalib/src/anomalib/models/cflow/utils.py
imports: from __future__ import annotations
  import logging
  import math
  import numpy
  import torch
  from FrEIA.framework import SequenceINN
  from torch import Tensor, nn
  from anomalib.models.components.flow import AllInOneBlock
label_desc: Use image node_id 1 for calling a global function with example usage: get_logp(dim_feature_vector, p_u, logdet_j) and returns: logp