<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_authority_over(self, url):
 """Return True of the current master has authority over url. In strict mode checks scheme, server and path. Otherwise checks just that the server names match or the query url is a sub-domain of the master. """

        s = urlparse(url)
        if (s.scheme != self.master_scheme):
            return(False)
        if (s.netloc != self.master_netloc):
            if (not s.netloc.endswith('.' + self.master_netloc)):
                return(False)
            # Maybe should allow parallel for 3+ components, eg. a.example.org,
            # b.example.org
        path = os.path.dirname(s.path)
        if (self.strict and
                path != self.master_path and
                not path.startswith(self.master_path)):
            return(False)
        return(True)