<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def befriend(self, other_agent, force=False):
        '''
        Try to become friends with another agent. The chances of
        success depend on both agents' openness.
        '''
        if force or self['openness'] > random():
            self.env.add_edge(self, other_agent)
            self.info('Made some friend {}'.format(other_agent))
            return True
        return False