def assemble(
    client,
    file_,
    dirname=None,
    generic=None,
    into_asm=None,
    path=None,
    ref_model=None,
    transform=None,
    constraints=None,
    package_assembly=None,
    walk_children=None,
    assemble_to_root=None,
    suppress=None,
):
    """Assemble a component into an assembly.

    Args:
        client (obj):
            creopyson Client.
        `file_` (str):
            File name component.
        dirname (str, optional):
            Diretory name. Defaults is Creo's current working directory.
        generic (str, optional):
            Generic model name (if file name represents an instance).
            Defaults is generic model name (if file name represents an
            instance).
        into_asm (str, optional):
            Target assembly. Defaults is currently active model.
        path (list:int, optional):
            Path to a component that the new part will be constrained to.
            Defaults to None.
        ref_model (str, optional):
            Reference model that the new part will be constrained to;
            only used if path is not given.  If there are multiple of this
            model in the assembly, the component will be assembled multiple
            times, once to each occurrence. Defaults to None.
        transform (obj:JLTransform, optional):
            Transform structure for the initial position and orientation of
            the new component; only used if there are no constraints, or for
            certain constraint types. Defaults to None.
        constraints (obj_array:JLConstraint, optional):
            Assembly constraints. Defaults to None.
        package_assembly (bool, optional):
            Whether to package the component to the assembly; only used if
            there are no constraints specified. Defaults is If there are no
            constraints, then the user will be prompted to constrain the
            component through the Creo user interface.
        walk_children (bool, optional):
            Whether to walk into subassemblies to find reference models to
            constrain to. Defaults to None.
        assemble_to_root (bool, optional):
            Whether to always assemble to the root assembly, or assemble to
            the subassembly containing the reference path/model.
            Defaults to None.
        suppress (bool, optional):
            Whether to suppress the components immediately after assembling
            them. Defaults to None.

    Returns:
        (dict):
            dirname (str):
                Directory name of component.
            files (list:str):
                File name of component.
            revision (int):
                Revision of file that was opened; if more than one
                file was opened, this field is not returned.
            featureid (int):
                Last Feature ID of component after assembly.

    """
    data = {"file": file_}
    if dirname is not None:
        data["dirname"] = dirname
    if generic is not None:
        data["generic"] = generic
    if into_asm is not None:
        data["into_asm"] = into_asm
    if path is not None:
        data["path"] = path
    if ref_model is not None:
        data["ref_model"] = ref_model
    if transform is not None:
        data["transform"] = transform
    if constraints is not None:
        data["constraints"] = constraints
    if package_assembly is not None:
        data["package_assembly"] = package_assembly
    if walk_children is not None:
        data["walk_children"] = walk_children
    if assemble_to_root is not None:
        data["assemble_to_root"] = assemble_to_root
    if suppress is not None:
        data["suppress"] = suppress
    return client._creoson_post("file", "assemble", data)