code: def update_security_group(self, sec_grp, name=None, desc=None):
          '''
          Updates a security group
          '''
          sec_grp_id = self._find_security_group_id(sec_grp)
          body = {'security_group': {}}
          if name:
              body['security_group']['name'] = name
          if desc:
              body['security_group']['description'] = desc
          return self.network_conn.update_security_group(sec_grp_id,
                                                         body=bodyf update_security_group(self, sec_grp, name=None, desc=None):
          '''
          Updates a security group
          '''
          sec_grp_id = self._find_security_group_id(sec_grp)
          body = {'security_group': {}}
          if name:
              body['security_group']['name'] = name
          if desc:
              body['security_group']['description'] = desc
          return self.network_conn.update_security_group(sec_grp_id,
                                                         body=body)
docs: Updates a security group