<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def basic_auth_string(username, password):
 """ Encode a username and password for use in an HTTP Basic Authentication header """

    b64 = base64.encodestring('%s:%s' % (username, password)).strip()
    return 'Basic %s' % b64