def METHOD_NAME(tensor_data, tensor_targets) -> str:
    """
    Computes a digest for the given Tensorflow tensor.
    :param tensor: A Tensorflow tensor.
    :return: A string digest.
    """
    if tensor_targets is None:
        return compute_numpy_digest(tensor_data.numpy())
    else:
        return compute_numpy_digest(tensor_data.numpy(), tensor_targets.numpy())