def get_dynamic_group(self, group_value):
        """Returns a view containing the samples from a dynamic grouped view
        with the given group value.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz

            dataset = foz.load_zoo_dataset("cifar10", split="test")

            view = dataset.take(1000).group_by("ground_truth.label")

            group = view.get_dynamic_group("cat")
            print(len(group))  # 104

        Args:
            group_value: the group value

        Returns:
            a :class:`DatasetView`
        """
        if not self._is_dynamic_groups:
            raise ValueError("%s does not contain dynamic groups" % type(self))

        group_expr, is_id_field, root_view, sort = self._parse_dynamic_groups()

        if isinstance(is_id_field, (list, tuple)):
            group_value = [
                ObjectId(v) if i else v
                for v, i in zip(group_value, is_id_field)
            ]
        elif is_id_field:
            group_value = ObjectId(group_value)

        pipeline = []

        if etau.is_str(group_expr):
            pipeline.append({"$match": {group_expr[1:]: group_value}})
        else:
            pipeline.append(
                {"$match": {"$expr": {"$eq": [group_expr, group_value]}}}
            )

        if sort is not None:
            pipeline.append({"$sort": OrderedDict(sort)})

        if root_view.media_type == fom.GROUP:
            view = root_view.mongo(pipeline, _group_slices=[])
            if self.group_slice != root_view.group_slice:
                view.group_slice = self.group_slice

            return view

        return root_view.mongo(pipeline)
Returns a view containing the samples from a dynamic grouped view
        with the given group value.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz

            dataset = foz.load_zoo_dataset("cifar10", split="test")

            view = dataset.take(1000).group_by("ground_truth.label")

            group = view.get_dynamic_group("cat")
            print(len(group))  # 104

        Args:
            group_value: the group value

        Returns:
            a :class:`DatasetView`
        
fiftyone/core/view.py