def get_category(self):
        """
        Returns the first category of a product.
        """
        object = self.get_parent()

        try:
            return object.get_categories()[0]
        except __HOLE__:
            return None
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/models.py/Product.get_category