code: def get_tmaster(self, topologyName, callback=None):
      
      if callback:
        self.tmaster_watchers[topologyName].append(callback)
      else:
        tmaster_path = self.get_tmaster_path(topologyName)
        with open(tmaster_path) as f:
          data = f.read()
          tmaster = TMasterLocation()
          tmaster.ParseFromString(data)
          return tmaster
docs: Get tmaster