code: def logodds(probability):
      try:
          odds_ratio = probability / (1 - probability)
          log_odds = np.log(odds_ratio)
      except ZeroDivisionError:
          raise ValueError(
              "lightgbm output a probability of 1.0 or 0.0. "
              "This is usually because of rare classes. "
              "Try adjusting min_data_in_leaf."
          )
  
      return log_odds
  
imports: from .compat import pd_DataFrame, pd_Series, pd_read_parquet
  import numpy
  from numpy.random import RandomState
  import blosc
  import dill
  from typing import Union, List, Dict, Optional
label_desc: Use image node_id 17 for calling a global function with example usage: logodds(probability) and returns: log_odds