<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_database(db):
 """Print credential as a table"""

    credentials = db.credentials()
    if credentials:
        table = Table(
            db.config['headers'],
            table_format=db.config['table_format'],
            colors=db.config['colors'],
            hidden=db.config['hidden'],
            hidden_string=db.config['hidden_string'],
        )
        click.echo(table.render(credentials))