def _get_algorithm_and_params(self, algorithm_name, algorithm_params):
algorithm_name = algorithm_name or CORRELATOR_ALGORITHM<EOL>try:<EOL><INDENT>self.algorithm = correlator_algorithms[algorithm_name]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise exceptions.AlgorithmNotFound('<STR_LIT>' + str(algorithm_name) + '<STR_LIT>')<EOL><DEDENT>if algorithm_params:<EOL><INDENT>if not isinstance(algorithm_params, dict):<EOL><INDENT>raise exceptions.InvalidDataFormat('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>self.algorithm_params = dict(algorithm_params.items() + self.algorithm_params.items())<EOL><DEDENT><DEDENT>
Get the specific algorithm and merge the algorithm params.
:param str algorithm: name of the algorithm to use.
:param dict algorithm_params: additional params for the specific algorithm.