parameters: (s)
docstring: Helper function analogous to pickle.loads().
docstring_summary: Helper function analogous to pickle.loads().
docstring_tokens: Helper function analogous to pickle . loads () .
function: def restricted_loads(s):
      """Helper function analogous to pickle.loads()."""
      if isinstance(s, str):
          raise TypeError("can not load pickle from unicode string")
      f = io.BytesIO(s)
      try:
          return RestrictedUnpickler(f, encoding='bytes').load()
      except pickle.UnpicklingError:
          raise RuntimeError("Not a valid Cifar100 Dataset.")
      except UnicodeDecodeError:
          raise RuntimeError("Not a valid Cifar100 Dataset.")
      except Exception:
          raise RuntimeError("Unexpected error while Unpickling Cifar100 Dataset.")
function_tokens: def restricted_loads ( s ) : if isinstance ( s , str ) : raise TypeError ( "can not load pickle from unicode string" ) f = io . BytesIO ( s ) try : return RestrictedUnpickler ( f , encoding = 'bytes' ) . load ( ) except pickle . UnpicklingError : raise RuntimeError ( "Not a valid Cifar100 Dataset." ) except UnicodeDecodeError : raise RuntimeError ( "Not a valid Cifar100 Dataset." ) except Exception : raise RuntimeError ( "Unexpected error while Unpickling Cifar100 Dataset." )