<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def target(self):
 """The "target" i.e. local part of the URL, consisting of the path and query."""

        target = self.path or '/'
        if self.query:
            target = '{}?{}'.format(target, self.query)
        return target