'Create partner based on action.
:return dict: dictionary organized as followed: {lead_id: partner_assigned_id}'

def _create_partner(self, lead_id, action, partner_id):

    if (action == 'each_exist_or_create'):
        partner_id = self.with_context(active_id=lead_id)._find_matching_partner()
        action = 'create'
    result = self.env['crm.lead'].browse(lead_id).handle_partner_assignation(action, partner_id)
    return result.get(lead_id)
