class_docstr: Mixin for TorchPolicy that adds entropy coeff decay.
class_docstr_tok: ["Mixin","for","TorchPolicy","that","adds","entropy","coeff","decay","."]
code: def __init__(self, entropy_coeff, entropy_coeff_schedule):
      self._entropy_coeff_schedule = None
      # Disable any scheduling behavior related to learning if Learner API is active.
      # Schedules are handled by Learner class.
      if entropy_coeff_schedule is None or (
          self.config.get("_enable_new_api_stack", False)
      ):
          self.entropy_coeff = entropy_coeff
      else:
          # Allows for custom schedule similar to lr_schedule format
          if isinstance(entropy_coeff_schedule, list):
              self._entropy_coeff_schedule = PiecewiseSchedule(
                  entropy_coeff_schedule,
                  outside_value=entropy_coeff_schedule[-1][-1],
                  framework=None,
              )
          else:
              # Implements previous version but enforces outside_value
              self._entropy_coeff_schedule = PiecewiseSchedule(
                  [[0, entropy_coeff], [entropy_coeff_schedule, 0.0]],
                  outside_value=0.0,
                  framework=None,
              )
          self.entropy_coeff = self._entropy_coeff_schedule.value(0)
  
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 EntropyCoeffSchedule object  with example: obj = EntropyCoeffSchedule(entropy_coeff, entropy_coeff_schedule)