<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getChemicalPotential(self, solution):
 """Call solver in order to calculate chemical potential. """

        if isinstance(solution, Solution):
            solution = solution.getSolution()

        self.mu = self.solver.chemicalPotential(solution)
        return self.mu