<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def netloc(self):
 """Network location including host and port"""

        if self.port:
            return '%s:%d' % (self.host, self.port)
        return self.host