<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_tarball(src_dir):
 """ Make gzipped tarball from a source directory :param src_dir: source directory :raises TypeError: if src_dir is not str """

    if type(src_dir) != str:
        raise TypeError('src_dir must be str')
    output_file = src_dir + ".tar.gz"
    log.msg("Wrapping tarball '{out}' ...".format(out=output_file))
    if not _dry_run:
        with tarfile.open(output_file, "w:gz") as tar:
            tar.add(src_dir, arcname=os.path.basename(src_dir))
    return output_file