import torch


def broadcast_to(tensor: torch.Tensor, shape):
    """
    Alias for torch.Tensor.expand. Use torch.Tensor.expand.

    >>> broadcast_to(torch.ones(3), (4, 3)).shape
    torch.Size([4, 3])
    >>> broadcast_to(torch.ones(1, 3), (4, 3)).shape
    torch.Size([4, 3])
    >>> broadcast_to(torch.ones(4, 1), (4, 3)).shape
    torch.Size([4, 3])
    """
    return tensor.expand(shape)