def _augment_coord_augables(self, cls_expected, subaugment_func,<EOL>augables_ois, parents=None,<EOL>hooks=None):
if self.deterministic:<EOL><INDENT>state_orig = self.random_state.get_state()<EOL><DEDENT>if parents is None:<EOL><INDENT>parents = []<EOL><DEDENT>input_was_single_instance = False<EOL>if isinstance(augables_ois, cls_expected):<EOL><INDENT>input_was_single_instance = True<EOL>augables_ois = [augables_ois]<EOL><DEDENT>ia.do_assert(ia.is_iterable(augables_ois))<EOL>ia.do_assert(all([isinstance(augable_oi, cls_expected)<EOL>for augable_oi in augables_ois]))<EOL>augables_ois_copy = augables_ois<EOL>if len(parents) == <NUM_LIT:0> or hooks is not None:<EOL><INDENT>augables_ois_copy = [augable_oi.deepcopy()<EOL>for augable_oi<EOL>in augables_ois]<EOL><DEDENT>if hooks is not None:<EOL><INDENT>augables_ois_copy = hooks.preprocess(<EOL>augables_ois_copy, augmenter=self, parents=parents)<EOL><DEDENT>augables_ois_result = augables_ois_copy<EOL>is_activated = (hooks is None and self.activated)<EOL>is_activated_hooks = (is_activated is False) and (<EOL>hooks is not None<EOL>and hooks.is_activated(augables_ois_copy,<EOL>augmenter=self, parents=parents,<EOL>default=self.activated)<EOL>)<EOL>if is_activated or is_activated_hooks:<EOL><INDENT>if len(augables_ois) > <NUM_LIT:0>:<EOL><INDENT>augables_ois_result = subaugment_func(<EOL>augables_ois_copy,<EOL>ia.copy_random_state(self.random_state),<EOL>parents,<EOL>hooks<EOL>)<EOL>ia.forward_random_state(self.random_state)<EOL><DEDENT><DEDENT>if hooks is not None:<EOL><INDENT>augables_ois_result = hooks.postprocess(<EOL>augables_ois_result, augmenter=self, parents=parents)<EOL><DEDENT>if self.deterministic:<EOL><INDENT>self.random_state.set_state(state_orig)<EOL><DEDENT>if input_was_single_instance:<EOL><INDENT>return augables_ois_result[<NUM_LIT:0>]<EOL><DEDENT>return augables_ois_result<EOL>
Augment coordinate-based augmentables.

This is an abstract function called by keypoints, bounding boxes,
polygons and line strings.
TODO keypoints, bounding boxes currently missing -- add them

Parameters
----------
cls_expected : class
    Class type that is expected. `augmentables_ois` will be
    verified to use that class.

subaugment_func : callable
    Function that will be called to actually augment the data.

augables_ois : imgaug.augmentables.polys.PolygonsOnImage \
               or imgaug.augmentables.lines.LineStringsOnImage \
               or list of imgaug.augmentables.lines.LineStringsOnImage \
               or list of imgaug.augmentables.polys.PolygonsOnImage
    The augmentables to augment. `augables_ois` is the abbreviation for
    "augmentables_on_images". Expected are the augmentables on a
    single image (single instance) or 1+ images (list of instances).

parents : None or list of imgaug.augmenters.meta.Augmenter, optional
    Parent augmenters that have previously been called before the
    call to this function. Usually you can leave this parameter as None.
    It is set automatically for child augmenters.

hooks : None or imgaug.HooksKeypoints, optional
    HooksKeypoints object to dynamically interfere with the
    augmentation process.

Returns
-------
imgaug.augmentables.polys.PolygonsOnImage \
or imgaug.augmentables.lines.LineStringsOnImage \
or list of imgaug.augmentables.polys.PolygonsOnImage \
or list of imgaug.augmentables.lines.LineStringsOnImage
    Augmented augmentables.