def _validate_partition_boundary(boundary):
    try:
        for unit in VALID_UNITS:
            if boundary.endswith(unit):
                return
        int(boundary)
    except Exception:
        raise CommandExecutionError(
            'Invalid partition boundary passed: "{0}"'.format(boundary)
        )
Ensure valid partition boundaries are supplied.
dataset/ETHPy150Open saltstack/salt/salt/modules/parted.py/_validate_partition_boundary