code: def brownian_motion_unknown_scales_prior_fn(
      num_timesteps, use_markov_chain
  ):
      """Generative process for the Brownian Motion model with unknown scales."""
      innovation_noise_scale = yield Root(
          tfd.LogNormal(0.0, 2.0, name="innovation_noise_scale")
      )
      _ = yield Root(
          tfd.LogNormal(0.0, 2.0, name="observation_noise_scale")
      )
      if use_markov_chain:
          yield brownian_motion_as_markov_chain(
              num_timesteps=num_timesteps,
              innovation_noise_scale=innovation_noise_scale,
          )
      else:
          yield from brownian_motion_prior_fn(
              num_timesteps,
              innovation_noise_scale=innovation_noise_scale,
          )
  
imports: import functools
  import tensorflow.compat.v2
  import tensorflow_probability
  from inference_gym.internal import data
  from inference_gym.targets import bayesian_model
  from inference_gym.targets import model
  from inference_gym.targets.ground_truth import brownian_motion_missing_middle_observations
  from inference_gym.targets.ground_truth import brownian_motion_unknown_scales_missing_middle_observations
label_desc: Use image node_id 3 for calling a global function with example usage: brownian_motion_unknown_scales_prior_fn(num_timesteps, use_markov_chain) without return types