def create_record(self, name, zone, type, data, extra=None):
        id = 'id-%s' % (name)

        zone = self.get_zone(zone_id=zone.id)

        if id in self._zones[zone.id]['records']:
            raise RecordAlreadyExistsError(record_id=id, value=None,
                                           driver=self)

        record = Record(id=id, name=name, type=type, data=data, extra=extra,
                        zone=zone, driver=self)
        self._zones[zone.id]['records'][id] = record
        return record
>>> driver = DummyDNSDriver('key', 'secret')
dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/dummy.py/DummyDNSDriver.create_record