[docs]defsubset(x:Any,indices:Sequence[int]):""" Generic subset that checks if the objects are n-dimensional for n > 1 (i.e. has a ``shape`` property of length greater than 1); if so, it calls :py:func:`~biocutils.subset_rows.subset_rows` to subset them along the first dimension, otherwise it assumes that they are vector-like and calls :py:func:`~biocutils.subset_sequence.subset_sequence` instead. Args: x: Object to be subsetted. Returns: The subsetted object, typically the same type as ``x``. """ifis_high_dimensional(x):returnsubset_rows(x,indices)else:returnsubset_sequence(x,indices)