code: def test_errors(self):
      # Trying to pass 2 Inputs
      model = Sequential()
      model.add(Input(shape=(2,), batch_size=3))
      with self.assertRaisesRegex(
          ValueError, "already been configured"
      ):
          model.add(Input(shape=(2,), batch_size=3))
      with self.assertRaisesRegex(
          ValueError, "already been configured"
      ):
          model.add(layers.InputLayer(shape=(2,), batch_size=3))
  
      # Same name 2x
      model = Sequential()
      model.add(layers.Dense(2, name="dense"))
      with self.assertRaisesRegex(
          ValueError, "should have unique names"
      ):
          model.add(layers.Dense(2, name="dense"))
  
      # No layers
      model = Sequential()
      x = np.random.random((3, 2))
      with self.assertRaisesRegex(ValueError, "no layers"):
          model(x)
  
      # Build conflict
      model = Sequential()
      model.add(Input(shape=(2,), batch_size=3))
      model.add(layers.Dense(2))
      with self.assertRaisesRegex(
          ValueError, "already been configured"
      ):
          model.build((3, 4))
      # But this works
      model.build((3, 2))
  
imports: import numpy
  import pytest
  from keras import backend
  from keras import layers
  from keras import testing
  from keras.layers.core.input_layer import Input
  from keras.models.functional import Functional
  from keras.models.sequential import Sequential
label_desc: Use image node_id 6 for calling the SequentialTest obj's underlying member method code with example usage: obj.test_errors() without return types