<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def children_as_pi(self, squash=False):
 """Returns the child visit counts as a probability distribution, pi If squash is true, exponentiate the probabilities by a temperature slightly larger than unity to encourage diversity in early play and hopefully to move away from 3-3s """

        probs = self.child_N
        if squash:
            probs = probs ** .98
        sum_probs = np.sum(probs)
        if sum_probs == 0:
            return probs
        return probs / np.sum(probs)