code: def sample_masks(
      num_samples: int, num_features: int, seed: Optional[int] = None
  ):
      """Samples LIME masks with at least 1 position disabled per sampled mask.
  
      The number of disabled features is sampled from a uniform distribution.
  
      Args:
        num_samples: The number of samples.
        num_features: The number of features to sample a mask for. Typically this is
          the number of tokens in the sentence.
        seed: Set this to an integer to make the sampling deterministic.
  
      Returns:
        Masks <bool>[num_samples, num_features] indicating which features are
        enabled (True) and which ones are disabled (False).
      """
      rng = np.random.RandomState(seed)
      positions = np.tile(np.arange(num_features), (num_samples, 1))
      permutation_fn = np.vectorize(
          rng.permutation, signature="(n)->(n)"
      )
      permutations = permutation_fn(
          positions
      )  # A shuffled range of positions.
      num_disabled_features = rng.randint(
          1, num_features + 1, (num_samples, 1)
      )
      # For num_disabled_features[i] == 2, this will set indices 0 and 1 to False.
      return permutations >= num_disabled_features
  
file_path: lit/lit_nlp/components/citrus/lime.py
imports: from collections.abc import Callable, Iterable, Sequence
  import functools
  from typing import Any, Optional
  from lit_nlp.components.citrus import helpers
  from lit_nlp.components.citrus import utils
  import numpy
  from sklearn import linear_model
  from sklearn import metrics
label_desc: Use image node_id 1 for calling a global function with example usage: sample_masks(num_samples, num_features, seed) and returns: unknown