def ex_create_keypair(self, name, public_key=None, password=None,
                          key_group=None):
        if public_key:
            if not key_group:
                key_group = 1
            data = {
                'name': name,
                'public_key': public_key,
                'key_group': key_group

            }
            params = urlencode(data)
            result = self.connection.request('/key/sshrsa/', data=params,
                                             method='POST').object
        else:
            if not key_group:
                key_group = 4
            if not password:
                password = self.random_password()
                data = {
                    'name': name,
                    'password': password,
                    'key_group': key_group
                }
            params = urlencode(data)
            result = self.connection.request('/key/password/', data=params,
                                             method='POST').object
        return result.get('data', {}).get('id', '')
Import the symbol defined by the specified symbol path.
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/nephoscale.py/NephoscaleNodeDriver.ex_create_keypair--crossover with--dataset/ETHPy150Open enthought/traits/traits/util/import_symbol.py/import_symbol