<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sample_hidden_from_visible(self, visible):
 """Sample the hidden units from the visible units. This is the Positive phase of the Contrastive Divergence algorithm. :param visible: activations of the visible units :return: tuple(hidden probabilities, hidden binary states) """

        hprobs = tf.nn.sigmoid(tf.add(tf.matmul(visible, self.W), self.bh_))
        hstates = utilities.sample_prob(hprobs, self.hrand)

        return hprobs, hstates