def METHOD_NAME(collection_obj):
    """
    This function is to create a new csv file in bag that lists info of all contained resources.
    A list that contains all csv content will be returned for unit test use.
    :param collection_obj: collection resource object
    :return: the csv content in a list object
    """
    tmp_dir = None
    short_key = ""
    csv_content_list = []
    try:
        short_key = collection_obj.short_id
        csv_full_name = CSV_FULL_NAME_TEMPLATE.format(collection_obj.short_id)
        # remove all files in bag
        # The only possible file is a .csv file.
        # It is removed before another is added.
        for f in collection_obj.files.all():
            delete_resource_file_only(collection_obj, f)
        if collection_obj.resources.count() > 0 or collection_obj.deleted_resources.count() > 0:
            # prepare csv content
            # create headers
            csv_header_row = ['Title',
                              'Type',
                              'ID',
                              'URL',
                              'Owners',
                              'Sharing Status'
                              ]
            csv_content_list.append(csv_header_row)
            # create rows for currently contained resources
            for res in collection_obj.resources.all():
                csv_data_row = [res.metadata.title,
                                res.resource_type,
                                res.short_id,
                                get_landing_page_url_template().format(res.short_id),
                                _get_owners_string(list(res.raccess.owners.all())),
                                _get_sharing_status_string(res)
                                ]
                csv_content_list.append(csv_data_row)
            # create rows for deleted resources
            for deleted_res_log in collection_obj.deleted_resources:
                csv_data_row = [deleted_res_log.resource_title,
                                deleted_res_log.resource_type,
                                deleted_res_log.resource_id,
                                DELETED_RES_STRING,
                                _get_owners_string(list(deleted_res_log.resource_owners.all()))
                                if deleted_res_log.resource_owners.count() > 0
                                else DELETED_RES_STRING,
                                DELETED_RES_STRING
                                ]
                csv_content_list.append(csv_data_row)
            # create a new csv on django server
            tmp_dir = tempfile.mkdtemp()
            csv_full_path = os.path.join(tmp_dir, csv_full_name)
            with open(csv_full_path, 'w') as csv_file_handle:
                w = csv.writer(csv_file_handle)
                for row in csv_content_list:
                    w.writerow(row)
            # push the new csv file to irods bag
            files = (UploadedFile(file=open(csv_full_path, 'rb'), name=csv_full_name))
            add_resource_files(collection_obj.short_id, files)
    except Exception as ex:
        logger.error("Failed to update_collection_list_csv in {}"
                     "Error:{} ".format(short_key, str(ex)))
        raise Exception("update_collection_list_csv error: " + str(ex))
    finally:
        if tmp_dir is not None:
            shutil.rmtree(tmp_dir)
        return csv_content_list