<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def install(self, build_dir, install_dir=None, **kwargs):
 """This function builds the cmake install command."""

        # pylint: disable=no-self-use
        del kwargs
        install_args = ["cmake", "--build", build_dir, "--target", "install"]
        install_args.extend(self._get_build_flags())
        if install_dir:
            self._target_config.env["DESTDIR"] = install_dir
        return [{"args": install_args}]