Returns the volume group sequence number. This number increases
        everytime the volume group is modified.
543865
def sequence(self):
        
        self.open()
        seq = lvm_vg_get_seqno(self.handle)
        self.close()
        return seq
118656
def list_lvm_volume_group(block_device):
    '''
    
    '''
    vg = None
    pvd = check_output(['pvdisplay', block_device]).splitlines()
    for lvm in pvd:
        lvm = lvm.decode('UTF-8')
        if lvm.strip().startswith('VG Name'):
            vg = ' '.join(lvm.strip().split()[2:])
    return vg
571020
def get_sequence(self, c, i, depth):
        

        result = []
        release = self.set_expanding()
        has_comma = False  # Used to indicate validity of group (`{1..2}` are an exception).
        is_empty = True  # Tracks whether the current slot is empty `{slot,slot,slot}`.

        # Detect numerical and alphabetic series: `{1..2}` etc.
        i.rewind(1)
        item = self.get_range(i)
        i.advance(1)
        if item is not None:
            self.release_expanding(release)
            return (x for x in item)

        try:
            while c:
                # Bash has some special top level logic. if `}` follows `{` but hasn't matched
                # a group yet, keep going except when the first 2 bytes are `{}` which gets
                # completely ignored.
                keep_looking = depth == 1 and not has_comma  # and i.index not in self.skip_index
                if (c == '}' and (not keep_looking or i.index == 2)):
                    # If there is no comma, we know the sequence is bogus.
                    if is_empty:
                        result = (x for x in self.combine(result, ['']))
                    if not has_comma:
                        result = ('{' + literal + '}' for literal in result)
                    self.release_expanding(release)
                    return (x for x in result)

                elif c == ',':
                    # Must be the first element in the list.
                    has_comma = True
                    if is_empty:
                        result = (x for x in self.combine(result, ['']))
                    else:
                        is_empty = True

                else:
                    if c == '}':
                        # Top level: If we didn't find a comma, we haven't
                        # completed the top level group. Request more and
                        # append to what we already have for the first slot.
                        if not result:
                            result = (x for x in self.combine(result, [c]))
                        else:
                            result = self.squash(result, [c])
                        value = self.get_literals(next(i), i, depth)
                        if value is not None:
                            result = self.squash(result, value)
                            is_empty = False
                    else:
                        # Lower level: Try to find group, but give up if cannot acquire.
                        value = self.get_literals(c, i, depth)
                        if value is not None:
                            result = (x for x in self.combine(result, value))
                            is_empty = False

                c = next(i)
        except StopIteration:
            self.release_expanding(release)
            raise
1012876
async def volume(gc: GroupControl, volume):
    """"""
    click.echo("Setting volume to %s" % volume)
    click.echo(await gc.set_group_volume(volume))
426650
public long getSequenceID()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getSequenceID");
    long sequenceID=0;
    sequenceID = msgItem.getMessage().getGuaranteedValueValueTick();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getSequenceID", new Long(sequenceID));
    return sequenceID;
  }
1027044
def volume(self):
        
        volume = ((np.pi * self.primitive.radius ** 2) *
                  self.primitive.height)
        return volume
995544
def get_volumes(self):
        """"""

        if self.volumes:
            volumes = []
            for v in self.volumes:
                volumes.extend(v.get_volumes())
            volumes.append(self)
            return volumes
        else:
            return [self]
233149
def next_group_id(self) -> int:
        
        ids: typing.Set[int] = set()
        for group in chain(self._blue_coa.groups, self._red_coa.groups):  # type: ignore

            id_ = group.group_id
            if id_ in ids:
                raise IndexError(group.group_name)
            ids.add(id_)
        return max(ids) + 1
1166339
def find_volume_groups(self):
        

        os.environ['LVM_SUPPRESS_FD_WARNINGS'] = '1'

        # find volume groups
        try:
            result = _util.check_output_(['pvdisplay'])
            pvname = vgname = None
            for line in result.splitlines():
                if '--- Physical volume ---' in line:
                    pvname = vgname = None
                elif "PV Name" in line:
                    pvname = line.replace("PV Name", "").strip()
                elif "VG Name" in line:
                    vgname = line.replace("VG Name", "").strip()

                if pvname and vgname:
                    try:
                        # unmount volume groups with a physical volume originating from a disk image
                        if re.match(self.orig_re_pattern, self.loopbacks[pvname]):
                            yield vgname, pvname
                    except Exception:
                        pass
                    pvname = vgname = None

        except Exception:
            pass
1366462
def group_by_key_impl(sequence):
    
    result = {}
    for element in sequence:
        if result.get(element[0]):
            result.get(element[0]).append(element[1])
        else:
            result[element[0]] = [element[1]]
    return six.viewitems(result)
493076
async def get_volume_information(self) -> List[Volume]:
        """"""
        res = await self.services["audio"]["getVolumeInformation"]({})
        volume_info = [Volume.make(services=self.services, **x) for x in res]
        if len(volume_info) < 1:
            logging.warning("Unable to get volume information")
        elif len(volume_info) > 1:
            logging.debug("The device seems to have more than one volume setting.")
        return volume_info
1127286
public int getNumberOfInputGroupVertices() {

		int retVal = 0;

		final Iterator<ManagementGroupVertex> it = this.groupVertices.iterator();
		while (it.hasNext()) {
			if (it.next().isInputVertex()) {
				++retVal;
			}
		}

		return retVal;
	}
375529
public java.util.List<VolumeModification> getVolumesModifications() {
        if (volumesModifications == null) {
            volumesModifications = new com.amazonaws.internal.SdkInternalList<VolumeModification>();
        }
        return volumesModifications;
    }
400051
def cluster_number(self, data, maxgap): 
        '''

        '''

        data.sort()
        groups = [[data[0]]]
        for x in data[1:]:
            if abs(x - groups[-1][-1]) <= maxgap:
                groups[-1].append(x)
            else:
                groups.append([x])
        return groups
21350
def GetVolumeByIdentifier(self, volume_identifier):
    
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return self._volumes[volume_identifier]
325148
def _get_device_group(self, device):
        '''
        '''

        return device.tm.cm.device_groups.device_group.load(
            name=self.name, partition=self.partition
        )
838139
def _EntriesGenerator(self):
    
    volume_index = getattr(self.path_spec, 'volume_index', None)
    location = getattr(self.path_spec, 'location', None)

    # Only the virtual root file has directory entries.
    if (volume_index is None and location is not None and
        location == self._file_system.LOCATION_ROOT):
      vslvm_volume_group = self._file_system.GetLVMVolumeGroup()

      for volume_index in range(
          0, vslvm_volume_group.number_of_logical_volumes):
        location = '/lvm{0:d}'.format(volume_index + 1)
        yield lvm_path_spec.LVMPathSpec(
            location=location, parent=self.path_spec.parent,
            volume_index=volume_index)