code: def add_edge(self, edgelist):
          
          if not isinstance(edgelist[0], list):
              edgelist = [edgelist]
          teneto.utils.check_TemporalNetwork_input(edgelist, 'edgelist')
          if len(edgelist[0]) == 4:
              colnames = ['i', 'j', 't', 'weight']
          elif len(edgelist[0]) == 3:
              colnames = ['i', 'j', 't']
          if self.hdf5:
              with pd.HDFStore(self.network) as hdf:
                  rows = hdf.get_storer('network').nrows
                  hdf.append('network', pd.DataFrame(edgelist, columns=colnames, index=np.arange(
                      rows, rows+len(edgelist))), format='table', data_columns=True)
              edgelist = np.array(edgelist)
              if np.max(edgelist[:, :2]) > self.netshape[0]:
                  self.netshape[0] = np.max(edgelist[:, :2])
              if np.max(edgelist[:, 2]) > self.netshape[1]:
                  self.netshape[1] = np.max(edgelist[:, 2])
          else:
              newedges = pd.DataFrame(edgelist, columns=colnames)
              self.network = pd.concat(
                  [self.network, newedges], ignore_index=True, sort=True)
              self._update_network()
docs: Adds an edge from network.
  
          Parameters
          ----------
  
          edgelist : list
              a list (or list of lists) containing the i,j and t indicies to be added. For weighted networks list should also contain a 'weight' key.
  
          Returns
          --------
              Updates TenetoBIDS.network dataframe with new edge