class_docstr: A list of tensors of different sizes, backed by a (offset, size, data)
  tuple.
  
  Indexing by LongTensor returns a new TensorList with the selected list
  elements (similar to indexing a torch index_select_).
  
  Indexing by an int returns a torch.Tensor with that list element.
class_docstr_tok: ["A","list","of","tensors","of","different","sizes",",","backed","by","a","(","offset",",","size",",","data",")","tuple",".","Indexing","by","LongTensor","returns","a","new","TensorList","with","the","selected","list","elements","(","similar","to","indexing","a","torch","index_select_",")",".","Indexing","by","an","int","returns","a","torch.Tensor","with","that","list","element","."]
code: def size(self, dim=None):
      # FIXME: this is a terrible API
  
      # to have similar appearance with other tensor types
      assert (
          dim == 0 or dim is None
      ), "TensorList can only have 1 dimension"
      if dim is None:
          return torch.Size([len(self)])
      else:
          return len(self)
  
imports: import torch
label_desc: Use image node_id 10 for calling the TensorList obj's underlying member method code with example usage: obj.size(dim) and returns: torch, len