def METHOD_NAME(cmd, client, account_name, resource_group_name, location, tag=None, active_directories=None):
    acc_active_directories = build_active_directories(active_directories)
    body = NetAppAccount(location=location, tags=generate_tags(tag), active_directories=acc_active_directories)
    return client.create_or_update(body, resource_group_name, account_name)