code: def sample_indices(
      length: int, n_indices: int = 10, seed: int = 1337
  ) -> np.ndarray:
      """Samples random indices
  
      Args:
          length: length to sample from
          n_indices: number of indices to sample
          seed: seed for sampling
  
      Returns:
          sampled indices
      """
      state = np.random.get_state()
      np.random.seed(seed)
      idx = np.random.choice(
          np.arange(length), size=min(length, n_indices), replace=False
      )
      np.random.set_state(state)
  
      return idx
  
imports: import logging
  import math
  import os
  from typing import Any, DefaultDict, Dict, List, Optional, Tuple, Union, no_type_check
  import networkx
  import numpy
  import pandas
  import pyarrow.parquet
  import torch
  from sklearn.model_selection import GroupShuffleSplit, train_test_split
  from torch import distributed
  from torch.utils.data import DataLoader, Sampler, SequentialSampler
  from llm_studio.src.datasets.conversation_chain_handler import ConversationChainHandler
  from llm_studio.src.utils.exceptions import LLMDataException
  from llm_studio.src.utils.utils import PatchedAttribute, set_seed
label_desc: Use image node_id 16 for calling a global function with example usage: sample_indices(length, n_indices, seed) and returns: idx