code: def bootstrapped_std_error_of_mean(
      data, sample_percent=0.25, num_samples=1000
  ):
      """
      Compute bootstrapped standard error of mean of input data.
  
      :param data: Input data (1D torch tensor or numpy array).
      :param sample_percent: Size of sample to use to calculate bootstrap statistic.
      :param num_samples: Number of times to sample.
      """
      if isinstance(data, torch.Tensor):
          data = data.cpu().numpy()
      sample_size = int(sample_percent * len(data))
      means = [
          np.mean(
              np.random.choice(data, size=sample_size, replace=True)
          )
          for i in range(num_samples)
      ]
      return np.std(means)
  
file_path: ReAgent/reagent/evaluation/cpe.py
imports: import logging
  import math
  from typing import Dict, NamedTuple, Optional
  import numpy
  import torch
  from reagent.core.tensorboardX import SummaryWriterContext
label_desc: Use image node_id 1 for calling a global function with example usage: bootstrapped_std_error_of_mean(data, sample_percent, num_samples) and returns: np