code: def get(self, a, b=None):
          
          links = self.dict.setdefault(a, {})
          if b is None: return links
          else: return links.get(b)
docs: Return a link distance or a dict of {node: distance} entries.
          .get(a,b) returns the distance or None;
          .get(a) returns a dict of {node: distance} entries, possibly {}.