code: def _extract_into_tensor(arr, timesteps, broadcast_shape):
      """
      Extract values from a 1-D numpy array for a batch of indices.
  
      :param arr: the 1-D numpy array.
      :param timesteps: a tensor of indices into the array to extract.
      :param broadcast_shape: a larger shape of K dimensions with the batch
                              dimension equal to the length of timesteps.
      :return: a tensor of shape [batch_size, 1, ...] where the shape has K dims.
      """
      res = (
          th.from_numpy(arr)
          .to(device=timesteps.device)[timesteps]
          .float()
      )
      while len(res.shape) < len(broadcast_shape):
          res = res[..., None]
      return res.expand(broadcast_shape)
  
imports: import enum
  import math
  import numpy
  import torch
  import torch
  from tqdm import tqdm
  from TTS.tts.layers.tortoise.dpm_solver import DPM_Solver, NoiseScheduleVP, model_wrapper
label_desc: Use image node_id 8 for calling a global function with example usage: _extract_into_tensor(arr, timesteps, broadcast_shape) and returns: res