<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(dbname, dbmode='a'):
 """Load an existing hdf5 database. Return a Database instance. :Parameters: filename : string Name of the hdf5 database to open. mode : 'a', 'r' File mode : 'a': append, 'r': read-only. """

    if dbmode == 'w':
        raise AttributeError("dbmode='w' not allowed for load.")
    db = Database(dbname, dbmode=dbmode)

    return db