code: def align_check(device, part_type, partition):
      '''
      Check if partition satisfies the alignment constraint of part_type.
      Type must be "minimal" or "optimal".
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' partition.align_check /dev/sda minimal 1
      '''
      _validate_device(device)
  
      if part_type not in set(['minimal', 'optimal']):
          raise CommandExecutionError(
              'Invalid part_type passed to partition.align_check'
          )
  
      try:
          int(partition)
      except Exception:
          raise CommandExecutionError(
              'Invalid partition passed to partition.align_check'
          )
  
      cmd = 'parted -m {0} align-check {1} {2}'.format(
          device, part_type, partition
      )
      out = __salt__['cmd.run'](cmd).splitlines()
      return ouf align_check(device, part_type, partition):
      '''
      Check if partition satisfies the alignment constraint of part_type.
      Type must be "minimal" or "optimal".
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' partition.align_check /dev/sda minimal 1
      '''
      _validate_device(device)
  
      if part_type not in set(['minimal', 'optimal']):
          raise CommandExecutionError(
              'Invalid part_type passed to partition.align_check'
          )
  
      try:
          int(partition)
      except Exception:
          raise CommandExecutionError(
              'Invalid partition passed to partition.align_check'
          )
  
      cmd = 'parted -m {0} align-check {1} {2}'.format(
          device, part_type, partition
      )
      out = __salt__['cmd.run'](cmd).splitlines()
      return out
docs: Check if partition satisfies the alignment constraint of part_type.
      Type must be "minimal" or "optimal".
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' partition.align_check /dev/sda minimal 1