def get_op_name(tensor_name):
    """
    Given a tensor name, return the corresponding op name.

    Args:
        tensor_name: The name of a tensor.

    Returns:
        str: The op name
    """
    return tensor_name.replace('^', '').split(':')[0]