code: def random_tensor(shape, random_state=None, **context):
      """Create a random tensor"""
      rns = T.check_random_state(random_state)
      return T.tensor(rns.random_sample(shape), **context)
  
file_path: tensorly/tensorly/random/base.py
imports: import numpy
  from ..cp_tensor import cp_to_tensor, CPTensor, cp_normalize, validate_cp_rank
  from ..tucker_tensor import tucker_to_tensor, TuckerTensor, validate_tucker_rank
  from ..tt_tensor import tt_to_tensor, TTTensor, validate_tt_rank
  from ..tt_matrix import tt_matrix_to_tensor, TTMatrix, validate_tt_matrix_rank
  from ..tr_tensor import TRTensor, tr_to_tensor, validate_tr_rank
  from ..parafac2_tensor import parafac2_to_tensor, Parafac2Tensor, parafac2_normalise
  from ..None import backend
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: random_tensor(shape, random_state) and returns: T