import torch


def tensor_encode_id(img_id):
    """
    Encodes a FathomNet image id like '00a6db92-5277-4772-b019-5b89c6af57c3' as a tensor
    of shape torch.Size([4]) of four integers in the range [0, 2^32-1].
    """
    hex_str = img_id.replace('-', '')
    length = len(hex_str) // 4
    img_id_enc = tuple(int(hex_str[i * length: (i + 1) * length], 16) for i in range(4))
    return torch.tensor(img_id_enc)