def METHOD_NAME(id, destination):
    """Get details of a detaset"""
    api = rest.DataSetApi(configuration.get_api_client())
    if destination is None:
        result = api.get_dataset(id)
        pprint.pp_dict(util.to_dict(result))
    else:
        with util.release_conn(api.get_dataset(id, _preload_content=False)) as result:
            logging.info('open %s', destination)
            with open(destination, 'wb') as f:
                logging.info('begin io %s', destination)
                f.write(result.data)
                logging.info('end io %s', destination)
        print('save', id, 'as', destination)