you dont integrate a cell function with torch.nn.LSTM, you write a for loop around it.
Something like:
for t in range(timesteps):
    for b in range(batches):
        h, c = F.lstm_cell(input, weight, bias, h, c)
        out = F.linear(weight_out, h)