code: def _get_layer_converter_fn(layer, add_custom_layers=False):
      """Get the right converter function for Keras"""
      layer_type = type(layer)
      if layer_type in _KERAS_LAYER_REGISTRY:
          convert_func = _KERAS_LAYER_REGISTRY[layer_type]
          if convert_func is _layers2.convert_activation:
              act_name = _layers2._get_activation_name_from_keras_layer(
                  layer
              )
              if act_name == "CUSTOM":
                  return None
          return convert_func
      elif add_custom_layers:
          return None
      else:
          raise TypeError(
              "Keras layer of type %s is not supported." % type(layer)
          )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/keras/_keras2_converter.py
imports: import logging
  from six import string_types
  from ...models.neural_network import NeuralNetworkBuilder
  from ...models.neural_network.update_optimizer_utils import AdamParams
  from ...models.neural_network.update_optimizer_utils import SgdParams
  from ...proto import FeatureTypes_pb2
  from collections import OrderedDict
  from ...proto import Model_pb2
  from ...models import datatypes
  from ...models import MLModel
  from ...models.utils import save_spec
  from ..._deps import _HAS_KERAS2_TF
label_desc: Use image node_id 4 for calling a global function with example usage: _get_layer_converter_fn(layer, add_custom_layers) and returns: convert_func, None, None