Check if a target exists

        This function is called by :mod:`luigi` to check if a task output exists. By default,
        :mod:`luigi` considers a task as complete if all it targets (outputs) exist.

        Returns:
            bool: ``True`` if target exists, ``False`` otherwise

def exists(self):
        """Check if a target exists

        This function is called by :mod:`luigi` to check if a task output exists. By default,
        :mod:`luigi` considers a task as complete if all it targets (outputs) exist.

        Returns:
            bool: ``True`` if target exists, ``False`` otherwise
        """
        # get DB connection
        session = client.get_client().create_session()

        # query for target existence
        ret = self._base_query(session).count() > 0

        session.close()

        return ret