<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_package(self, client, package):
 """Install package on instance."""

        install_cmd = "{sudo} '{install} {package}'".format(
            sudo=self.get_sudo_exec_wrapper(),
            install=self.get_install_cmd(),
            package=package
        )

        try:
            out = ipa_utils.execute_ssh_command(
                client,
                install_cmd
            )
        except Exception as error:
            raise IpaDistroException(
                'An error occurred installing package {package} '
                'on instance: {error}'.format(
                    package=package,
                    error=error
                )
            )
        else:
            return out