class_docstr: StudentTProcessRegressionModel.
  
  This is an analogue of the GaussianProcessRegressionModel, except
  we use a Student-T process here (i.e. this represents the posterior predictive
  of a Student-T process, where we assume that the kernel hyperparameters and
  degrees of freedom are constants, and hence do optimizations in the
  constructor).
  
  Specifically, we assume a Student-T Process prior, `f ~ StP(df, m, k)` along
  with a noise model whose mathematical implementation is similar to a Gaussian
  Process albeit whose interpretation is very different.
  
  In particular, this noise model takes the following form:
  
  ```none
    e ~ MVT(df + n, 0, 1 + v / df * (1 + f^T k(t, t)^-1 f^T))
  ```
  which can be interpreted as Multivariate T noise whose covariance depends on
  the data fit term.
  
  Using the conventions in the `GaussianProcessRegressionModel` class, we have
  the posterior predictive distribution as:
  
  ```none
    (f(t) | t, x, f(x)) ~ MVT(df + n, loc, cov)
  
    where
  
    n is the number of observation points
    b = (y - loc)^T @ inv(k(x, x) + v * I) @ (y - loc)
    v = observation noise variance
    loc = k(t, x) @ inv(k(x, x) + v * I) @ (y - loc)
    cov = (df + b - 2) / (df + n - 2) * (
      k(t, t) - k(t, x) @ inv(k(x, x) + v * I) @ k(x, t))
  ```
  
  Note that the posterior predictive mean is the same as a Gaussian Process,
  but the covariance is multiplied by a term that takes in to account
  observations.
  
  This distribution does precomputaiton in the constructor by assuming
  `observation_index_points`, `observations`, `kernel` and
  `observation_noise_variance` are fixed, and that `mean_fn` is the zero
  function. We do these precomputations in a non-tape safe way.
  
  #### References
  [1]: Amar Shah, Andrew Gordon Wilson, Zoubin Ghahramani.
       Student-t Processes as Alternatives to Gaussian Processes
       https://arxiv.org/abs/1402.4306
  
  [2]: Qingtao Tang, Yisen Wang, Shu-Tao Xia
       Student-T Process Regression with Dependent Student-t Noise
       https://www.ijcai.org/proceedings/2017/393
class_docstr_tok: ["StudentTProcessRegressionModel",".","This","is","an","analogue","of","the","GaussianProcessRegressionModel",",","except","we","use","a","Student-T","process","here","(","i.e",".","this","represents","the","posterior","predictive","of","a","Student-T","process",",","where","we","assume","that","the","kernel","hyperparameters","and","degrees","of","freedom","are","constants",",","and","hence","do","optimizations","in","the","constructor",")",".","Specifically",",","we","assume","a","Student-T","Process","prior",",","`","f","~","StP","(","df",",","m",",","k",")","`","along","with","a","noise","model","whose","mathematical","implementation","is","similar","to","a","Gaussian","Process","albeit","whose","interpretation","is","very","different",".","In","particular",",","this","noise","model","takes","the","following","form",":","``","`","none","e","~","MVT","(","df","+","n",",","0",",","1","+","v","\/","df","*","(","1","+","f^T","k","(","t",",","t",")","^-1","f^T",")",")","``","`","which","can","be","interpreted","as","Multivariate","T","noise","whose","covariance","depends","on","the","data","fit","term",".","Using","the","conventions","in","the","`","GaussianProcessRegressionModel","`","class",",","we","have","the","posterior","predictive","distribution","as",":","``","`","none","(","f","(","t",")","|","t",",","x",",","f","(","x",")",")","~","MVT","(","df","+","n",",","loc",",","cov",")","where","n","is","the","number","of","observation","points","b","=","(","y","-","loc",")","^T","@","inv","(","k","(","x",",","x",")","+","v","*","I",")","@","(","y","-","loc",")","v","=","observation","noise","variance","loc","=","k","(","t",",","x",")","@","inv","(","k","(","x",",","x",")","+","v","*","I",")","@","(","y","-","loc",")","cov","=","(","df","+","b","-","2",")","\/","(","df","+","n","-","2",")","*","(","k","(","t",",","t",")","-","k","(","t",",","x",")","@","inv","(","k","(","x",",","x",")","+","v","*","I",")","@","k","(","x",",","t",")",")","``","`","Note","that","the","posterior","predictive","mean","is","the","same","as","a","Gaussian","Process",",","but","the","covariance","is","multiplied","by","a","term","that","takes","in","to","account","observations",".","This","distribution","does","precomputaiton","in","the","constructor","by","assuming","`","observation_index_points","`",",","`","observations","`",",","`","kernel","`","and","`","observation_noise_variance","`","are","fixed",",","and","that","`","mean_fn","`","is","the","zero","function",".","We","do","these","precomputations","in","a","non-tape","safe","way",".","#","#","#","#","References","[","1","]",":","Amar","Shah",",","Andrew","Gordon","Wilson",",","Zoubin","Ghahramani",".","Student-t","Processes","as","Alternatives","to","Gaussian","Processes","https",":","\/\/arxiv.org\/abs\/1402.4306","[","2","]",":","Qingtao","Tang",",","Yisen","Wang",",","Shu-Tao","Xia","Student-T","Process","Regression","with","Dependent","Student-t","Noise","https",":","\/\/www.ijcai.org\/proceedings\/2017\/393"]
docstr: Returns a StudentTProcessRegressionModel with precomputed quantities.
  
  This differs from the constructor by precomputing quantities associated with
  observations in a non-tape safe way. `index_points` is the only parameter
  that is allowed to vary (i.e. is a `Variable` / changes after
  initialization).
  
  Specifically:
  
  * We make `observation_index_points` and `observations` mandatory
    parameters.
  * We precompute `kernel(observation_index_points, observation_index_points)`
    along with any other associated quantities relating to `df`, `kernel`,
    `observations` and `observation_index_points`.
  
  A typical usecase would be optimizing kernel hyperparameters for a
  `StudenTProcess`, and computing the posterior predictive with respect to
  those optimized hyperparameters and observation / index-points pairs.
  
  WARNING: This method assumes `index_points` is the only varying parameter
  (i.e. is a `Variable` / changes after initialization) and hence is not
  tape-safe.
  
  Args:
    df: Positive Floating-point `Tensor` representing the degrees of freedom.
      Must be greather than 2.
    kernel: `PositiveSemidefiniteKernel`-like instance representing the
      StP's covariance function.
    observation_index_points: (Nested) `float` `Tensor` representing finite
      collection, or batch of collections, of points in the index set for
      which some data has been observed. Shape (or shape of each nested
      component) has the form `[b1, ..., bB, e, f1, ..., fF]` where `F` is
      the number of feature dimensions and must equal
      `kernel.feature_ndims` (or its corresponding nested component), and
      `e` is the number (size) of index points in each batch. `[b1, ...,
      bB, e]` must be broadcastable with the shape of `observations`, and
      `[b1, ..., bB]` must be broadcastable with the shapes of all other
      batched parameters (`kernel.batch_shape`, `index_points`, etc). The
      default value is `None`, which corresponds to the empty set of
      observations, and simply results in the prior predictive model (a StP
      with noise of variance `predictive_noise_variance`).
    observations: `float` `Tensor` representing collection, or batch of
      collections, of observations corresponding to
      `observation_index_points`. Shape has the form `[b1, ..., bB, e]`, which
      must be brodcastable with the batch and example shapes of
      `observation_index_points`. The batch shape `[b1, ..., bB]` must be
      broadcastable with the shapes of all other batched parameters
      (`kernel.batch_shape`, `index_points`, etc.). The default value is
      `None`, which corresponds to the empty set of observations, and simply
      results in the prior predictive model (a StP with noise of variance
      `predictive_noise_variance`).
    observations_is_missing:  `bool` `Tensor` of shape `[..., e]`,
      representing a batch of boolean masks.  When `observations_is_missing`
      is not `None`, the returned distribution is conditioned only on the
      observations for which the corresponding elements of
      `observations_is_missing` are `True`.
    index_points: (Nested) `float` `Tensor` representing finite collection, or
      batch of collections, of points in the index set over which the StP is
      defined.  Shape (or shape of each nested component) has the form
      `[b1, ..., bB, e, f1, ..., fF]` where `F` is the number of feature
      dimensions and must equal `kernel.feature_ndims` (or its corresponding
      nested component) and `e` is the number (size) of index points in each
      batch. Ultimately this distribution corresponds to an `e`-dimensional
      multivariate Student T. The batch shape must be broadcastable with
      `kernel.batch_shape` and any batch dims yielded by `mean_fn`.
    observation_noise_variance: `float` `Tensor` representing the variance
      of the noise in the Normal likelihood distribution of the model. May be
      batched, in which case the batch shape must be broadcastable with the
      shapes of all other batched parameters (`kernel.batch_shape`,
      `index_points`, etc.).
      Default value: `0.`
    predictive_noise_variance: `float` `Tensor` representing the variance in
      the posterior predictive model. If `None`, we simply re-use
      `observation_noise_variance` for the posterior predictive noise. If set
      explicitly, however, we use this value. This allows us, for example, to
      omit predictive noise variance (by setting this to zero) to obtain
      noiseless posterior predictions of function values, conditioned on noisy
      observations.
    mean_fn: Python `callable` that acts on `index_points` to produce a
      collection, or batch of collections, of mean values at `index_points`.
      Takes a (nested) `Tensor` of shape `[b1, ..., bB, e, f1, ..., fF]` and
      returns a `Tensor` whose shape is broadcastable with `[b1, ..., bB, e]`.
      Default value: `None` implies the constant zero function.
    cholesky_fn: Callable which takes a single (batch) matrix argument and
      returns a Cholesky-like lower triangular factor.  Default value: `None`,
      in which case `make_cholesky_with_jitter_fn` is used with the `jitter`
      parameter.
    always_yield_multivariate_student_t: Deprecated and ignored.
    validate_args: Python `bool`, default `False`. When `True` distribution
      parameters are checked for validity despite possibly degrading runtime
      performance. When `False` invalid inputs may silently render incorrect
      outputs.
      Default value: `False`.
    allow_nan_stats: Python `bool`, default `True`. When `True`,
      statistics (e.g., mean, mode, variance) use the value `NaN` to
      indicate the result is undefined. When `False`, an exception is raised
      if one or more of the statistic's batch members are undefined.
      Default value: `False`.
    name: Python `str` name prefixed to Ops created by this class.
      Default value: 'PrecomputedStudentTProcessRegressionModel'.
    _precomputed_divisor_matrix_cholesky: Internal parameter -- do not use.
    _precomputed_solve_on_observation: Internal parameter -- do not use.
  Returns
    An instance of `StudentTProcessRegressionModel` with precomputed
    quantities associated with observations.
docstr_tok: ["Returns","a","StudentTProcessRegressionModel","with","precomputed","quantities",".","This","differs","from","the","constructor","by","precomputing","quantities","associated","with","observations","in","a","non-tape","safe","way",".","`","index_points","`","is","the","only","parameter","that","is","allowed","to","vary","(","i.e",".","is","a","`","Variable","`","\/","changes","after","initialization",")",".","Specifically",":","*","We","make","`","observation_index_points","`","and","`","observations","`","mandatory","parameters",".","*","We","precompute","`","kernel","(","observation_index_points",",","observation_index_points",")","`","along","with","any","other","associated","quantities","relating","to","`","df","`",",","`","kernel","`",",","`","observations","`","and","`","observation_index_points","`",".","A","typical","usecase","would","be","optimizing","kernel","hyperparameters","for","a","`","StudenTProcess","`",",","and","computing","the","posterior","predictive","with","respect","to","those","optimized","hyperparameters","and","observation","\/","index-points","pairs",".","WARNING",":","This","method","assumes","`","index_points","`","is","the","only","varying","parameter","(","i.e",".","is","a","`","Variable","`","\/","changes","after","initialization",")","and","hence","is","not","tape-safe",".","Args",":","df",":","Positive","Floating-point","`","Tensor","`","representing","the","degrees","of","freedom",".","Must","be","greather","than","2.","kernel",":","`","PositiveSemidefiniteKernel","`","-like","instance","representing","the","StP","'s","covariance","function",".","observation_index_points",":","(","Nested",")","`","float","`","`","Tensor","`","representing","finite","collection",",","or","batch","of","collections",",","of","points","in","the","index","set","for","which","some","data","has","been","observed",".","Shape","(","or","shape","of","each","nested","component",")","has","the","form","`","[","b1",",","...",",","bB",",","e",",","f1",",","...",",","fF","]","`","where","`","F","`","is","the","number","of","feature","dimensions","and","must","equal","`","kernel.feature_ndims","`","(","or","its","corresponding","nested","component",")",",","and","`","e","`","is","the","number","(","size",")","of","index","points","in","each","batch",".","`","[","b1",",","...",",","bB",",","e","]","`","must","be","broadcastable","with","the","shape","of","`","observations","`",",","and","`","[","b1",",","...",",","bB","]","`","must","be","broadcastable","with","the","shapes","of","all","other","batched","parameters","(","`","kernel.batch_shape","`",",","`","index_points","`",",","etc",")",".","The","default","value","is","`","None","`",",","which","corresponds","to","the","empty","set","of","observations",",","and","simply","results","in","the","prior","predictive","model","(","a","StP","with","noise","of","variance","`","predictive_noise_variance","`",")",".","observations",":","`","float","`","`","Tensor","`","representing","collection",",","or","batch","of","collections",",","of","observations","corresponding","to","`","observation_index_points","`",".","Shape","has","the","form","`","[","b1",",","...",",","bB",",","e","]","`",",","which","must","be","brodcastable","with","the","batch","and","example","shapes","of","`","observation_index_points","`",".","The","batch","shape","`","[","b1",",","...",",","bB","]","`","must","be","broadcastable","with","the","shapes","of","all","other","batched","parameters","(","`","kernel.batch_shape","`",",","`","index_points","`",",","etc.",")",".","The","default","value","is","`","None","`",",","which","corresponds","to","the","empty","set","of","observations",",","and","simply","results","in","the","prior","predictive","model","(","a","StP","with","noise","of","variance","`","predictive_noise_variance","`",")",".","observations_is_missing",":","`","bool","`","`","Tensor","`","of","shape","`","[","...",",","e","]","`",",","representing","a","batch","of","boolean","masks",".","When","`","observations_is_missing","`","is","not","`","None","`",",","the","returned","distribution","is","conditioned","only","on","the","observations","for","which","the","corresponding","elements","of","`","observations_is_missing","`","are","`","True","`",".","index_points",":","(","Nested",")","`","float","`","`","Tensor","`","representing","finite","collection",",","or","batch","of","collections",",","of","points","in","the","index","set","over","which","the","StP","is","defined",".","Shape","(","or","shape","of","each","nested","component",")","has","the","form","`","[","b1",",","...",",","bB",",","e",",","f1",",","...",",","fF","]","`","where","`","F","`","is","the","number","of","feature","dimensions","and","must","equal","`","kernel.feature_ndims","`","(","or","its","corresponding","nested","component",")","and","`","e","`","is","the","number","(","size",")","of","index","points","in","each","batch",".","Ultimately","this","distribution","corresponds","to","an","`","e","`","-dimensional","multivariate","Student","T.","The","batch","shape","must","be","broadcastable","with","`","kernel.batch_shape","`","and","any","batch","dims","yielded","by","`","mean_fn","`",".","observation_noise_variance",":","`","float","`","`","Tensor","`","representing","the","variance","of","the","noise","in","the","Normal","likelihood","distribution","of","the","model",".","May","be","batched",",","in","which","case","the","batch","shape","must","be","broadcastable","with","the","shapes","of","all","other","batched","parameters","(","`","kernel.batch_shape","`",",","`","index_points","`",",","etc.",")",".","Default","value",":","`","0.","`","predictive_noise_variance",":","`","float","`","`","Tensor","`","representing","the","variance","in","the","posterior","predictive","model",".","If","`","None","`",",","we","simply","re-use","`","observation_noise_variance","`","for","the","posterior","predictive","noise",".","If","set","explicitly",",","however",",","we","use","this","value",".","This","allows","us",",","for","example",",","to","omit","predictive","noise","variance","(","by","setting","this","to","zero",")","to","obtain","noiseless","posterior","predictions","of","function","values",",","conditioned","on","noisy","observations",".","mean_fn",":","Python","`","callable","`","that","acts","on","`","index_points","`","to","produce","a","collection",",","or","batch","of","collections",",","of","mean","values","at","`","index_points","`",".","Takes","a","(","nested",")","`","Tensor","`","of","shape","`","[","b1",",","...",",","bB",",","e",",","f1",",","...",",","fF","]","`","and","returns","a","`","Tensor","`","whose","shape","is","broadcastable","with","`","[","b1",",","...",",","bB",",","e","]","`",".","Default","value",":","`","None","`","implies","the","constant","zero","function",".","cholesky_fn",":","Callable","which","takes","a","single","(","batch",")","matrix","argument","and","returns","a","Cholesky-like","lower","triangular","factor",".","Default","value",":","`","None","`",",","in","which","case","`","make_cholesky_with_jitter_fn","`","is","used","with","the","`","jitter","`","parameter",".","always_yield_multivariate_student_t",":","Deprecated","and","ignored",".","validate_args",":","Python","`","bool","`",",","default","`","False","`",".","When","`","True","`","distribution","parameters","are","checked","for","validity","despite","possibly","degrading","runtime","performance",".","When","`","False","`","invalid","inputs","may","silently","render","incorrect","outputs",".","Default","value",":","`","False","`",".","allow_nan_stats",":","Python","`","bool","`",",","default","`","True","`",".","When","`","True","`",",","statistics","(","e.g.",",","mean",",","mode",",","variance",")","use","the","value","`","NaN","`","to","indicate","the","result","is","undefined",".","When","`","False","`",",","an","exception","is","raised","if","one","or","more","of","the","statistic","'s","batch","members","are","undefined",".","Default","value",":","`","False","`",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class",".","Default","value",":","'PrecomputedStudentTProcessRegressionModel","'",".","_precomputed_divisor_matrix_cholesky",":","Internal","parameter","--","do","not","use",".","_precomputed_solve_on_observation",":","Internal","parameter","--","do","not","use",".","Returns","An","instance","of","`","StudentTProcessRegressionModel","`","with","precomputed","quantities","associated","with","observations","."]
code: def precompute_regression_model(
      df,
      kernel,
      observation_index_points,
      observations,
      observations_is_missing=None,
      index_points=None,
      observation_noise_variance=0.0,
      predictive_noise_variance=None,
      mean_fn=None,
      cholesky_fn=None,
      always_yield_multivariate_student_t=None,
      validate_args=False,
      allow_nan_stats=False,
      name="PrecomputedStudentTProcessRegressionModel",
      _precomputed_divisor_matrix_cholesky=None,
      _precomputed_solve_on_observation=None,
  ):
      """Returns a StudentTProcessRegressionModel with precomputed quantities.
  
      This differs from the constructor by precomputing quantities associated with
      observations in a non-tape safe way. `index_points` is the only parameter
      that is allowed to vary (i.e. is a `Variable` / changes after
      initialization).
  
      Specifically:
  
      * We make `observation_index_points` and `observations` mandatory
        parameters.
      * We precompute `kernel(observation_index_points, observation_index_points)`
        along with any other associated quantities relating to `df`, `kernel`,
        `observations` and `observation_index_points`.
  
      A typical usecase would be optimizing kernel hyperparameters for a
      `StudenTProcess`, and computing the posterior predictive with respect to
      those optimized hyperparameters and observation / index-points pairs.
  
      WARNING: This method assumes `index_points` is the only varying parameter
      (i.e. is a `Variable` / changes after initialization) and hence is not
      tape-safe.
  
      Args:
        df: Positive Floating-point `Tensor` representing the degrees of freedom.
          Must be greather than 2.
        kernel: `PositiveSemidefiniteKernel`-like instance representing the
          StP's covariance function.
        observation_index_points: (Nested) `float` `Tensor` representing finite
          collection, or batch of collections, of points in the index set for
          which some data has been observed. Shape (or shape of each nested
          component) has the form `[b1, ..., bB, e, f1, ..., fF]` where `F` is
          the number of feature dimensions and must equal
          `kernel.feature_ndims` (or its corresponding nested component), and
          `e` is the number (size) of index points in each batch. `[b1, ...,
          bB, e]` must be broadcastable with the shape of `observations`, and
          `[b1, ..., bB]` must be broadcastable with the shapes of all other
          batched parameters (`kernel.batch_shape`, `index_points`, etc). The
          default value is `None`, which corresponds to the empty set of
          observations, and simply results in the prior predictive model (a StP
          with noise of variance `predictive_noise_variance`).
        observations: `float` `Tensor` representing collection, or batch of
          collections, of observations corresponding to
          `observation_index_points`. Shape has the form `[b1, ..., bB, e]`, which
          must be brodcastable with the batch and example shapes of
          `observation_index_points`. The batch shape `[b1, ..., bB]` must be
          broadcastable with the shapes of all other batched parameters
          (`kernel.batch_shape`, `index_points`, etc.). The default value is
          `None`, which corresponds to the empty set of observations, and simply
          results in the prior predictive model (a StP with noise of variance
          `predictive_noise_variance`).
        observations_is_missing:  `bool` `Tensor` of shape `[..., e]`,
          representing a batch of boolean masks.  When `observations_is_missing`
          is not `None`, the returned distribution is conditioned only on the
          observations for which the corresponding elements of
          `observations_is_missing` are `True`.
        index_points: (Nested) `float` `Tensor` representing finite collection, or
          batch of collections, of points in the index set over which the StP is
          defined.  Shape (or shape of each nested component) has the form
          `[b1, ..., bB, e, f1, ..., fF]` where `F` is the number of feature
          dimensions and must equal `kernel.feature_ndims` (or its corresponding
          nested component) and `e` is the number (size) of index points in each
          batch. Ultimately this distribution corresponds to an `e`-dimensional
          multivariate Student T. The batch shape must be broadcastable with
          `kernel.batch_shape` and any batch dims yielded by `mean_fn`.
        observation_noise_variance: `float` `Tensor` representing the variance
          of the noise in the Normal likelihood distribution of the model. May be
          batched, in which case the batch shape must be broadcastable with the
          shapes of all other batched parameters (`kernel.batch_shape`,
          `index_points`, etc.).
          Default value: `0.`
        predictive_noise_variance: `float` `Tensor` representing the variance in
          the posterior predictive model. If `None`, we simply re-use
          `observation_noise_variance` for the posterior predictive noise. If set
          explicitly, however, we use this value. This allows us, for example, to
          omit predictive noise variance (by setting this to zero) to obtain
          noiseless posterior predictions of function values, conditioned on noisy
          observations.
        mean_fn: Python `callable` that acts on `index_points` to produce a
          collection, or batch of collections, of mean values at `index_points`.
          Takes a (nested) `Tensor` of shape `[b1, ..., bB, e, f1, ..., fF]` and
          returns a `Tensor` whose shape is broadcastable with `[b1, ..., bB, e]`.
          Default value: `None` implies the constant zero function.
        cholesky_fn: Callable which takes a single (batch) matrix argument and
          returns a Cholesky-like lower triangular factor.  Default value: `None`,
          in which case `make_cholesky_with_jitter_fn` is used with the `jitter`
          parameter.
        always_yield_multivariate_student_t: Deprecated and ignored.
        validate_args: Python `bool`, default `False`. When `True` distribution
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
          Default value: `False`.
        allow_nan_stats: Python `bool`, default `True`. When `True`,
          statistics (e.g., mean, mode, variance) use the value `NaN` to
          indicate the result is undefined. When `False`, an exception is raised
          if one or more of the statistic's batch members are undefined.
          Default value: `False`.
        name: Python `str` name prefixed to Ops created by this class.
          Default value: 'PrecomputedStudentTProcessRegressionModel'.
        _precomputed_divisor_matrix_cholesky: Internal parameter -- do not use.
        _precomputed_solve_on_observation: Internal parameter -- do not use.
      Returns
        An instance of `StudentTProcessRegressionModel` with precomputed
        quantities associated with observations.
      """
  
      with tf.name_scope(name) as name:
          if tf.nest.is_nested(kernel.feature_ndims):
              input_dtype = dtype_util.common_dtype(
                  [kernel, index_points, observation_index_points],
                  dtype_hint=nest_util.broadcast_structure(
                      kernel.feature_ndims, tf.float32
                  ),
              )
              dtype = dtype_util.common_dtype(
                  [
                      observations,
                      observation_noise_variance,
                      predictive_noise_variance,
                      df,
                  ],
                  tf.float32,
              )
          else:
              # If the index points are not nested, we assume they are of the same
              # dtype as the STPRM.
              dtype = dtype_util.common_dtype(
                  [
                      index_points,
                      observation_index_points,
                      observations,
                      observation_noise_variance,
                      predictive_noise_variance,
                      df,
                  ],
                  tf.float32,
              )
              input_dtype = dtype
  
          # Convert to tensor arguments that are expected to not be Variables / not
          # going to change.
          df = tf.convert_to_tensor(df, dtype=dtype)
          observation_index_points = nest_util.convert_to_nested_tensor(
              observation_index_points,
              dtype=input_dtype,
              allow_packing=True,
          )
          observation_noise_variance = tf.convert_to_tensor(
              observation_noise_variance, dtype=dtype
          )
          observations = tf.convert_to_tensor(observations, dtype=dtype)
  
          if observations_is_missing is not None:
              observations_is_missing = tf.convert_to_tensor(
                  observations_is_missing
              )
  
          if cholesky_fn is None:
              cholesky_fn = cholesky_util.make_cholesky_with_jitter_fn()
  
          conditional_kernel = DampedSchurComplement(
              df=df,
              schur_complement=schur_complement_lib.SchurComplement.with_precomputed_divisor(
                  base_kernel=kernel,
                  fixed_inputs=observation_index_points,
                  fixed_inputs_is_missing=observations_is_missing,
                  diag_shift=observation_noise_variance,
                  cholesky_fn=cholesky_fn,
                  _precomputed_divisor_matrix_cholesky=(
                      _precomputed_divisor_matrix_cholesky
                  ),
              ),
              fixed_inputs_observations=observations,
              observations_is_missing=observations_is_missing,
              validate_args=validate_args,
          )
  
          mean_fn = stochastic_process_util.maybe_create_mean_fn(
              mean_fn, dtype
          )
  
          solve_on_observation = _precomputed_solve_on_observation
          if solve_on_observation is None:
              observation_cholesky_operator = (
                  tf.linalg.LinearOperatorLowerTriangular(
                      conditional_kernel.divisor_matrix_cholesky()
                  )
              )
              diff = observations - mean_fn(observation_index_points)
              if observations_is_missing is not None:
                  diff = tf.where(
                      observations_is_missing,
                      tf.zeros([], dtype=diff.dtype),
                      diff,
                  )
              solve_on_observation = (
                  observation_cholesky_operator.solvevec(
                      observation_cholesky_operator.solvevec(diff),
                      adjoint=True,
                  )
              )
  
          def conditional_mean_fn(x):
              k_x_obs = kernel.matrix(x, observation_index_points)
              if observations_is_missing is not None:
                  k_x_obs = tf.where(
                      observations_is_missing[..., tf.newaxis, :],
                      tf.zeros([], dtype=k_x_obs.dtype),
                      k_x_obs,
                  )
              return mean_fn(x) + tf.linalg.matvec(
                  k_x_obs, solve_on_observation
              )
  
          stprm = StudentTProcessRegressionModel(
              df=df,
              kernel=kernel,
              observation_index_points=observation_index_points,
              observations=observations,
              index_points=index_points,
              observation_noise_variance=observation_noise_variance,
              predictive_noise_variance=predictive_noise_variance,
              cholesky_fn=cholesky_fn,
              always_yield_multivariate_student_t=(
                  always_yield_multivariate_student_t
              ),
              _conditional_kernel=conditional_kernel,
              _conditional_mean_fn=conditional_mean_fn,
              validate_args=validate_args,
              allow_nan_stats=allow_nan_stats,
              name=name,
          )
  
          # pylint: disable=protected-access
          stprm._precomputed_divisor_matrix_cholesky = (
              conditional_kernel.schur_complement._precomputed_divisor_matrix_cholesky
          )
          stprm._precomputed_solve_on_observation = solve_on_observation
          # pylint: enable=protected-access
  
      return stprm
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python import util
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import cholesky_util
  from tensorflow_probability.python.distributions import student_t_process
  from tensorflow_probability.python.distributions.internal import stochastic_process_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels import schur_complement
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 2 for calling the StudentTProcessRegressionModel obj's underlying member method code with example usage: obj.precompute_regression_model(df, kernel, observation_index_points, observations, observations_is_missing, index_points, observation_noise_variance, predictive_noise_variance, mean_fn, cholesky_fn, always_yield_multivariate_student_t, validate_args, allow_nan_stats, name, _precomputed_divisor_matrix_cholesky, _precomputed_solve_on_observation) and returns: stprm, unknown