def from_tensor(tensor_item):
    """
    Transform from tensor to a single numerical value.

    :param tensor_item: tensor with a single value
    :return: a single numerical value extracted from the tensor
    """
    value = tensor_item.item()
    if value == -1:
        return None
    return value