<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ucs_manager_connect(self, ucsm_ip):
 """Connects to a UCS Manager."""

        if not self.ucsmsdk:
            self.ucsmsdk = self._import_ucsmsdk()

        ucsm = CONF.ml2_cisco_ucsm.ucsms.get(ucsm_ip)

        if not ucsm or not ucsm.ucsm_username or not ucsm.ucsm_password:
            LOG.error('UCS Manager network driver failed to get login '
                      'credentials for UCSM %s', ucsm_ip)
            return None

        handle = self.ucsmsdk.handle(ucsm_ip, ucsm.ucsm_username,
                                     ucsm.ucsm_password)
        try:
            handle.login()
        except Exception as e:
            # Raise a Neutron exception. Include a description of
            # the original  exception.
            raise cexc.UcsmConnectFailed(ucsm_ip=ucsm_ip, exc=e)

        return handle