human
Complete this python program:
def Scan(client, table, callback):
assistant
#Here is the Python code you requested.

    """Scans an entire table.
    """
    def _OnScan(retry_cb, count, result):
        for item in result.items:
            if options.options.col_names:
                item = dict([(k, v) for (k, v) in item.items() if (k in options.options.col_names)])
            pprint.pprint(item)
        if result.last_key:
            retry_cb(result.last_key, (count + len(result.items)))
        else:
            return callback(('scanned    %d    items' % (count + len(result.items))))
    def _Scan(last_key=None, count=0):
        client.Scan(table.name, partial(_OnScan, _Scan, count), None, limit=50, excl_start_key=last_key)
    _Scan()