<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_key(api_key, **kwargs):
 """Returns an authenticated Heroku instance, via API Key."""


    h = Heroku(**kwargs)

    # Login.
    h.authenticate(api_key)

    return h