code: def test_invalid_modes(self):
      # Modes 'r+', 'r', and 'w+' cannot work with Theano, becausei
      # the output array may be modified inplace, and that should not
      # modify the original file.
      path = Variable(Generic())
      for mmap_mode in ("r+", "r", "w+", "toto"):
          self.assertRaises(
              ValueError,
              tensor.load,
              path,
              "int32",
              (False,),
              mmap_mode,
          )
  
file_path: Theano/theano/tensor/tests/test_io.py
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import theano
  from theano import tensor, function, Variable, Generic
  import numpy
  import os
label_desc: Use image node_id 3 for calling the T_load_tensor obj's underlying member method code with example usage: obj.test_invalid_modes() without return types