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))

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 .