def rename(client, name, new_name, file_=None):
    """Rename a feature.

    Args:
        client (obj):
            creopyson Client.
        name (str|int, optional):
            Feature name (str) or Feature ID (int).
        new_name (str):
            New name for the feature.
        `file_` (str, optional):
            File name.
            Defaults is the currently active model.

    Returns:
        None

    """
    data = {"new_name": new_name}
    if file_ is not None:
        data["file"] = file_
    else:
        active_file = client.file_get_active()
        if active_file:
            data["file"] = active_file["file"]
    if isinstance(name, (str)):
        data["name"] = name
    elif isinstance(name, (int)):
        data["feat_id"] = name
    else:
        raise TypeError("name must be str or int")
    return client._creoson_post("feature", "rename", data)