<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_build_info(api_instance, build_id=None, keys=DEFAULT_BUILD_KEYS, wait=False):
 """ print build info about a job """

    build = (api_instance.get_build(build_id) if build_id
             else api_instance.get_last_build())
    output = ""

    if wait:
        build.block_until_complete()

    if 'timestamp' in keys:
        output += str(build.get_timestamp()) + '\n'

    if 'console' in keys:
        output += build.get_console() + '\n'

    if 'scm' in keys:
        # https://github.com/salimfadhley/jenkinsapi/pull/250
        # try/except while this is still occuring
        try:
            output += build.get_revision() + '\n'
        except IndexError:
            pass

    return output