<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create(gandi, domain, zone_id, name, type, value, ttl):
 """Create new DNS zone record entry for a domain."""


    if not zone_id:
        result = gandi.domain.info(domain)
        zone_id = result['zone_id']

    if not zone_id:
        gandi.echo('No zone records found, domain %s doesn\'t seems to be '
                   'managed at Gandi.' % domain)
        return

    record = {'type': type, 'name': name, 'value': value}
    if ttl:
        record['ttl'] = ttl

    result = gandi.record.create(zone_id, record)
    return result