code: def apply_action_mask(self, policy, action_mask):
      masked_policy = torch.mul(policy, action_mask)
      action_mask = torch.clamp(torch.log(action_mask), -1e10, 3.4e38)
      return masked_policy + action_mask
  
file_path: ray/rllib_contrib/leela_chess_zero/src/rllib_leela_chess_zero/leela_chess_zero/leela_chess_zero_model.py
imports: import numpy
  from ray.rllib.models.preprocessors import get_preprocessor
  from ray.rllib.models.torch.torch_modelv2 import TorchModelV2
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.typing import ModelConfigDict, TensorType
label_desc: Use image node_id 4 for calling the LeelaChessZeroModel obj's underlying member method code with example usage: obj.apply_action_mask(policy, action_mask) and returns: unknown