code: def _get_activation_name_from_keras_layer(keras_layer):
      if isinstance(
          keras_layer, keras.layers.advanced_activations.LeakyReLU
      ):
          non_linearity = "LEAKYRELU"
      elif isinstance(
          keras_layer, keras.layers.advanced_activations.PReLU
      ):
          non_linearity = "PRELU"
      elif isinstance(
          keras_layer, keras.layers.advanced_activations.ELU
      ):
          non_linearity = "ELU"
      elif isinstance(
          keras_layer,
          keras.layers.advanced_activations.ParametricSoftplus,
      ):
          non_linearity = "PARAMETRICSOFTPLUS"
      elif isinstance(
          keras_layer, keras.layers.advanced_activations.ThresholdedReLU
      ):
          non_linearity = "THRESHOLDEDRELU"
      else:
          import six
  
          if six.PY2:
              act_name = keras_layer.activation.func_name
          else:
              act_name = keras_layer.activation.__name__
  
          if act_name == "softmax":
              non_linearity = "SOFTMAX"
          elif act_name == "sigmoid":
              non_linearity = "SIGMOID"
          elif act_name == "tanh":
              non_linearity = "TANH"
          elif act_name == "relu":
              non_linearity = "RELU"
          elif act_name == "softplus":
              non_linearity = "SOFTPLUS"
          elif act_name == "softsign":
              non_linearity = "SOFTSIGN"
          elif act_name == "hard_sigmoid":
              non_linearity = "SIGMOID_HARD"
          elif act_name == "linear":
              non_linearity = "LINEAR"
          else:
              _utils.raise_error_unsupported_categorical_option(
                  "activation", act_name, "Dense", keras_layer.name  ##
              )
  
      return non_linearity
  
imports: from .None import _utils
  import keras
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _get_activation_name_from_keras_layer(keras_layer) and returns: non_linearity