code: def get_legal_indices_mask(num_arms):
      # FIXME: hardcoded for now
      assert (
          num_arms == 5
      ), f"unsupported num_arms = {num_arms}, should be 5"
      LEGAL_PROBS = torch.tensor([0.95, 1.0, 0.95, 0.8, 0.8])
      return torch.bernoulli(LEGAL_PROBS).to(torch.uint8)
  
imports: import random
  import gym
  import numpy
  import reagent.core.types
  import torch
  from reagent.core.dataclasses import dataclass
  from reagent.core.parameters import NormalizationData, NormalizationKey
  from reagent.gym.envs.env_wrapper import EnvWrapper
  from reagent.gym.normalizers import only_continuous_normalizer
label_desc: Use image node_id 3 for calling a global function with example usage: get_legal_indices_mask(num_arms) and returns: torch