def validate_cols(ctx, param, value):
    if value:
        try:
            validated = {c: index for index, c in enumerate(value.split(',')) if c}
            for col in ('name', 'login', 'password'):
                assert col in validated
            return validated
        except (AttributeError, ValueError):
            raise click.BadParameter('cols need to be in format col1,col2,col3')
        except __HOLE__ as e:
            raise click.BadParameter('missing mandatory column: {}'.format(e))
dataset/ETHPy150Open marcwebbie/passpie/passpie/validators.py/validate_cols