<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def api_key_from_file(url):
 """ Check bugzillarc for an API key for this Bugzilla URL. """

    path = os.path.expanduser('~/.config/python-bugzilla/bugzillarc')
    cfg = SafeConfigParser()
    cfg.read(path)
    domain = urlparse(url)[1]
    if domain not in cfg.sections():
        return None
    if not cfg.has_option(domain, 'api_key'):
        return None
    return cfg.get(domain, 'api_key')