def get_basename(filename, extention):
    """
    Get basename for a file contains format extension.
    :param filename: (string) filename/path
    :return: basename of a file without path or extension
    """
    if extention in filename:
        filename = filename.split("/")[-1]
        base = filename.replace(extention, "")
        return base
    else:
        raise ValueError("Wrong file type.")