<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put_file(self, client, source_file):
 """ Put file on instance in default SSH directory. """

        try:
            file_name = os.path.basename(source_file)
            ipa_utils.put_file(client, source_file, file_name)
        except Exception as error:
            raise IpaCloudException(
                'Failed copying file, "{0}"; {1}.'.format(
                    source_file, error
                )
            )
        else:
            return file_name