code: def logpdf(x, shape, loc=0.0, scale=1.0, skewness=1.0):
      m1 = (np.sqrt(shape) * sp.gamma((shape - 1.0) / 2.0)) / (
          np.sqrt(np.pi) * sp.gamma(shape / 2.0)
      )
      loc = loc + (skewness - (1.0 / skewness)) * scale * m1
      result = np.zeros(x.shape[0])
      result[x - loc < 0] = (
          np.log(2.0)
          - np.log(skewness + 1.0 / skewness)
          + ss.t.logpdf(
              x=skewness * x[(x - loc) < 0],
              loc=loc[(x - loc) < 0] * skewness,
              df=shape,
              scale=scale[(x - loc) < 0],
          )
      )
      result[x - loc >= 0] = (
          np.log(2.0)
          - np.log(skewness + 1.0 / skewness)
          + ss.t.logpdf(
              x=x[(x - loc) >= 0] / skewness,
              loc=loc[(x - loc) >= 0] / skewness,
              df=shape,
              scale=scale[(x - loc) >= 0],
          )
      )
      return result
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  import scipy.special
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import gas
  from ..None import data_check
label_desc: Use image node_id 1 for calling a global function with example usage: logpdf(x, shape, loc, scale, skewness) and returns: result