<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_primary_zone_by_axfr(self, account_name, zone_name, master, tsig_key=None, key_value=None):
 """Creates a new primary zone by zone transferring off a master. Arguments: account_name -- The name of the account that will contain this zone. zone_name -- The name of the zone. It must be unique. master -- Primary name server IP address. Keyword Arguments: tsig_key -- For TSIG-enabled zones: The transaction signature key. NOTE: Requires key_value. key_value -- TSIG key secret. """

        zone_properties = {"name": zone_name, "accountName": account_name, "type": "PRIMARY"}
        if tsig_key is not None and key_value is not None:
            name_server_info = {"ip": master, "tsigKey": tsig_key, "tsigKeyValue": key_value}
        else:
            name_server_info = {"ip": master}
        primary_zone_info = {"forceImport": True, "createType": "TRANSFER", "nameServer": name_server_info}
        zone_data = {"properties": zone_properties, "primaryCreateInfo": primary_zone_info}
        return self.rest_api_connection.post("/v1/zones", json.dumps(zone_data))