code: def _read_elem_neighbors(self, fid):
          
          # get number of boundary elements
          # types 11 and 12 are boundary elements
          sizes = sum([len(self.element_data[key]) for key in (11, 12) if
                       self.element_data.get(key, None) is not None])
          self.neighbors = []
  
          try:
              for i in range(0, sizes):
                  self.neighbors.append(int(fid.readline().strip()))
          except Exception as e:
              raise Exception('Not enough neighbors in file')
docs: Read the boundary-element-neighbors from the end of the file