class_docstr: Unit-test mock environment.
  
  Args:
      states: States specification.
      actions: Actions specification.
      min_timesteps: Minimum number of timesteps.
code: def random_mask(cls, action_spec):
      shape = action_spec.get("shape", ()) + (
          action_spec["num_values"],
      )
      mask = np.random.random_sample(size=shape)
      min_mask = np.amin(mask, -1, keepdims=True)
      max_mask = np.amax(mask, -1, keepdims=True)
      threshold = np.random.random_sample(size=shape)
      mask = mask < min_mask + threshold * (max_mask - min_mask)
      assert mask.any(-1).all() and not mask.all(-1).any()
      return mask
  
file_path: tensorforce/test/unittest_environment.py
imports: from collections import OrderedDict
  from random import random
  import numpy
  from tensorforce import Environment, TensorforceError, util
label_desc: Use image node_id 6 for calling the UnittestEnvironment obj's underlying member method code with example usage: obj.random_mask(cls, action_spec) and returns: mask