def METHOD_NAME(business: Business, parties: dict, change_filing_rec: Filing):
    """Create a new party or get them if they already exist."""
    # Cease the party roles not present in the edit request
    end_date_time = datetime.datetime.utcnow()
    parties_to_update = [party.get('officer').get('id') for party in parties if
                         party.get('officer').get('id') is not None]
    existing_party_roles = PartyRole.get_party_roles(business.id, end_date_time.date())
    for party_role in existing_party_roles:
        if party_role.party_id not in parties_to_update:
            party_role.cessation_date = end_date_time
    # Create and Update
    for party_info in parties:
        # Create if id not present
        # If id is present and is a GUID then this is an id specific to the UI which is not relevant to the backend.
        # The backend will have an id of type int
        if not party_info.get('officer').get('id') or \
                (party_info.get('officer').get('id') and not isinstance(party_info.get('officer').get('id'), int)):
            _create_party_info(business, change_filing_rec, party_info)
        else:
            # Update if id is present
            _update_party(party_info)