code: def hostloc(self):
          
          hostloc = self.hostname
          if self.port:
              hostloc = '{hostloc}:{port}'.format(hostloc=hostloc, port=self.port)
  
          return hostloc
docs: return host:port