code: def test_instance_norm_macro_kwargs():
      from lasagne.layers import (
          Layer,
          NonlinearityLayer,
          StandardizationLayer,
          ScaleLayer,
          BiasLayer,
          instance_norm,
      )
      from lasagne.nonlinearities import identity
  
      input_shape = (2, 3, 4, 4)
      obj = object()
  
      # check if it passes on kwargs
      layer = Mock(Layer, output_shape=input_shape)
      instack = instance_norm(
          layer, learn_bias=False, learn_scale=False, name="foo"
      )
      assert isinstance(instack, StandardizationLayer)
      assert instack.name == "foo"
  
      # check if created layers are named with kwargs name
      layer = Mock(Layer, output_shape=input_shape, nonlinearity=obj)
      layer.name = "foo"
      instack = instance_norm(layer, name="foo_inorm")
      assert isinstance(instack, NonlinearityLayer)
      assert instack.name == "foo_inorm_nonlin"
      assert isinstance(instack.input_layer, BiasLayer)
      assert instack.input_layer.name == "foo_inorm_bias"
      assert isinstance(instack.input_layer.input_layer, ScaleLayer)
      assert instack.input_layer.input_layer.name == "foo_inorm_scale"
      assert isinstance(
          instack.input_layer.input_layer.input_layer,
          StandardizationLayer,
      )
      assert (
          instack.input_layer.input_layer.input_layer.name
          == "foo_inorm"
      )
  
      # check if created layers are named with wrapped layer name
      layer = Mock(Layer, output_shape=input_shape, nonlinearity=obj)
      layer.name = "foo"
      instack = instance_norm(layer)
      assert isinstance(instack, NonlinearityLayer)
      assert instack.name == "foo_in_nonlin"
      assert isinstance(instack.input_layer, BiasLayer)
      assert instack.input_layer.name == "foo_in_bias"
      assert isinstance(instack.input_layer.input_layer, ScaleLayer)
      assert instack.input_layer.input_layer.name == "foo_in_scale"
      assert isinstance(
          instack.input_layer.input_layer.input_layer,
          StandardizationLayer,
      )
      assert (
          instack.input_layer.input_layer.input_layer.name == "foo_in"
      )
  
      # check if created layers remain unnamed if no names are given
      layer = Mock(Layer, output_shape=input_shape, nonlinearity=obj)
      instack = instance_norm(layer)
      assert isinstance(instack, NonlinearityLayer)
      assert instack.name is None
      assert isinstance(instack.input_layer, BiasLayer)
      assert instack.input_layer.name is None
      assert isinstance(instack.input_layer.input_layer, ScaleLayer)
      assert instack.input_layer.input_layer.name is None
      assert isinstance(
          instack.input_layer.input_layer.input_layer,
          StandardizationLayer,
      )
      assert instack.input_layer.input_layer.input_layer.name is None
  
imports: from mock import Mock
  import numpy
  import pytest
  import theano
label_desc: Use image node_id 5 for calling a global function with example usage: test_instance_norm_macro_kwargs() without return types