code: def get_otmann_distance_computer_from_args(
      nn_type,
      non_assignment_penalty,
      mislabel_coeffs,
      struct_coeffs,
      dist_type,
      connectivity_diff_cost_function=DFLT_CONN_COST_FUNC,
  ):
      """Obtains a transport distance computer from dists."""
      if nn_type.startswith("cnn"):
          (
              all_layer_labels,
              label_mismatch_penalty,
          ) = get_cnn_layer_label_mismatch_penalties(
              non_assignment_penalty
          )
          struct_penalty_groups = CNN_STRUCTURAL_PENALTY_GROUPS
      elif nn_type.startswith("mlp"):
          (
              all_layer_labels,
              label_mismatch_penalty,
          ) = get_mlp_layer_label_mismatch_penalties(
              non_assignment_penalty, nn_type[4:]
          )
          struct_penalty_groups = MLP_STRUCTURAL_PENALTY_GROUPS
      # Now create a tp_comp object
      tp_comp = OTMANNDistanceComputer(
          all_layer_labels,
          label_mismatch_penalty,
          non_assignment_penalty,
          struct_penalty_groups,
          PATH_LENGTH_TYPES,
          dflt_mislabel_coeffs=mislabel_coeffs,
          dflt_struct_coeffs=struct_coeffs,
          dflt_dist_type=dist_type,
          connectivity_diff_cost_function=connectivity_diff_cost_function,
      )
      return tp_comp
  
imports: import numpy
  from .None import neural_network
  from ..gp.kernel import ExpSumOfDistsKernel, SumOfExpSumOfDistsKernel
  from ..utils.oper_utils import opt_transport
label_desc: Use image node_id 4 for calling a global function with example usage: get_otmann_distance_computer_from_args(nn_type, non_assignment_penalty, mislabel_coeffs, struct_coeffs, dist_type, connectivity_diff_cost_function) and returns: tp_comp