def METHOD_NAME(output_name, model_type):
  if model_type == 'Nndct':
    return output_name
  if model_type == 'tensorflow':
    output_name = output_name.split(':')[0]
  elif model_type == 'torch':
    if output_name.split('_')[-1] in ['backward', 'forward']:
      output_name = ''.join(output_name.split('_')[:-1])
  else:
    raise KeyError("node_from_output is not available for model type " +
                   str(model_type))
  output_map = GLOBAL_MAP.get_ele(NNDCT_KEYS.OUTPUT_TO_NODE_MAP)
  if output_map and output_name in output_map:
    return output_map[output_name]
  return output_name