code: def datasets_from_raw_input(raw_input):
      if isinstance(raw_input, tf.data.Dataset):
          return [raw_input]
  
      if sp.issparse(raw_input):
          return [
              create_tensorrec_dataset_from_sparse_matrix(raw_input)
          ]
  
      if isinstance(raw_input, six.string_types):
          return [create_tensorrec_dataset_from_tfrecord(raw_input)]
  
      if isinstance(raw_input, list):
          if all(
              [
                  isinstance(input_val, tf.data.Dataset)
                  for input_val in raw_input
              ]
          ):
              return raw_input
  
          if all([sp.issparse(input_val) for input_val in raw_input]):
              return [
                  create_tensorrec_dataset_from_sparse_matrix(
                      input_sparse_matrix
                  )
                  for input_sparse_matrix in raw_input
              ]
  
          if all(
              [
                  isinstance(input_val, six.string_types)
                  for input_val in raw_input
              ]
          ):
              return [
                  create_tensorrec_dataset_from_tfrecord(input_str)
                  for input_str in raw_input
              ]
  
      raise ValueError(
          "Input must be a scipy sparse matrix, an iterable of scipy sprase matrices, or a TensorFlow "
          "Dataset"
      )
  
imports: import math
  import numpy
  import random
  import scipy.sparse
  import six
  import tensorflow
  from weakref import WeakKeyDictionary
  from .input_utils import create_tensorrec_dataset_from_sparse_matrix, create_tensorrec_dataset_from_tfrecord
label_desc: Use image node_id 3 for calling a global function with example usage: datasets_from_raw_input(raw_input) and returns: list, list, list, raw_input, unknown, unknown