code: def interactions_per_snapshots(self, t=None):
          
          if t is None:
              return {k: v / 2 for k, v in self.snapshots.items()}
          else:
              try:
                  return self.snapshots[t] / 2
              except KeyError:
                  return 0
docs: Return the number of interactions within snapshot t.
  
          Parameters
          ----------
  
          t : snapshot id (default=None)
              If None will be returned total number of interactions across all snapshots
  
          Returns
          -------
  
          nd : dictionary, or number
              A dictionary with snapshot ids as keys and interaction count as values or
              a number if a single snapshot id is specified.
  
          Examples
          --------
          >>> G = dn.DynGraph()
          >>> G.add_path([0,1,2,3], t=0)
          >>> G.add_path([0,4,5,6], t=1)
          >>> G.add_path([7,1,2,3], t=2)
          >>> G.interactions_per_snapshots(t=0)
          3
          >>> G.interactions_per_snapshots()
          {0: 3, 1: 3, 2: 3}