def import_program(client, file_=None, filename=None, dirname=None):
    """Import a program file for a model.

    Cannot specify both file and filename parameters.

    Args:
        client (obj):
            creopyson Client.
        `file_` (str, optional):
            Destination Model name.
            Defaults is currently active model, or the model for
            the filename parameter if given.
        filename (str, optional):
            Source file name.
            Default is the model name with the appropriate file extension.
        dirname (str, optional):
            Source directory. Defaults is Creo's current working directory.

    Returns:
        str: Name of the model updated

    """
    data = {}
    if file_ is not None:
        data["file"] = file_
    else:
        active_file = client.file_get_active()
        if active_file:
            data["file"] = active_file["file"]
    if filename is not None:
        data["filename"] = filename
    if dirname is not None:
        data["dirname"] = dirname
    return client._creoson_post("interface", "import_program", data, "file")