<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getInfo(self, query=None, process=False, mode="phonefy", qURI=None):
 """ Method that checks the presence of a given query and recovers the first list of complains. Args: ----- query: Query to verify. process: Calling the processing function. mode: Mode to be executed. qURI: A query to be checked. Return: ------- Python structure for the html processed. Raises: ------- NoCredentialsException. NotImplementedModeError. BadImplementationError. """

        results = []
        data = ""

        if self._modeIsValid(mode=mode) and self._isValidQuery(query, mode=mode):
            if mode in ["mailfy", "phonefy", "searchfy", "usufy"]:
                try:
                    results = getattr(self, "do_{}".format(mode))(query)
                except AttributeError as e:
                    raise NotImplementedModeError(str(self), mode)

        return json.dumps(results)