class_docstr: Assigns the `update_kl()` method to a TorchPolicy.
  
  This is used by Algorithms to update the KL coefficient
  after each learning step based on `config.kl_target` and
  the measured KL value (from the train_batch).
class_docstr_tok: ["Assigns","the","`","update_kl","(",")","`","method","to","a","TorchPolicy",".","This","is","used","by","Algorithms","to","update","the","KL","coefficient","after","each","learning","step","based","on","`","config.kl_target","`","and","the","measured","KL","value","(","from","the","train_batch",")","."]
code: def __init__(self, config):
      # The current KL value (as python float).
      self.kl_coeff = config["kl_coeff"]
      # Constant target value.
      self.kl_target = config["kl_target"]
  
imports: from ray.rllib.policy.policy import Policy, PolicyState
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.torch_policy import TorchPolicy
  from ray.rllib.utils.annotations import DeveloperAPI, override
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.schedules import PiecewiseSchedule
label_desc: Use image node_id 1 to create a new KLCoeffMixin object  with example: obj = KLCoeffMixin(config)