You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: list_stage_table.rs
    path of file: ./repos/databend/src/query/service/src/table_functions/list_stage
    
    the code of the file until where you have to start completion: // Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Licens
    
    async fn generate(&mut self) -> Result<Option<DataBlock>> {
        if self.is_finished {
            return Ok(None);
        }

        self.is_finished = true;

        let (stage_info, path) =
            resolve_stage_location(self.ctx.as_ref(), &self.args_parsed.location).await?;
        let enable_experimental_rbac_check = self
            .ctx
            .get_settings()
            .get_enable_experimental_rbac_check()?;
        if enable_experimental_rbac_check {
            let visibility_checker = self.ctx.get_visibility_checker().await?;
            if !stage_info.is_temporary
                && !visibility_checker.check_stage_read_visibility(&stage_info.stage_name)
            {
                return Err(ErrorCode::PermissionDenied(format!(
                    "Permission denied, privilege READ is required on stage {} for user {}",
                    stage_info.stage_name.clone(),
                    &self.ctx.get_current_user()?.identity(),
                )));
            }
        }
        let op = StageTable::get_op(&stage_info)?;

        let files_info = StageFilesInfo {
            path,
            files: self.args_parsed.files_info.files.clone(),
            pattern: self.args_parsed.files_info.pattern.clone(),
        };

        let files = files_info.list(&op, false, None).await?;

        let names: Vec<String> = files.iter().map(|file| file.path.to_string()).collect();

        let sizes: Vec<u64> = files.iter().map(|file| file.size).collect();
        let etags: Vec<Option<String>> = files
            .iter()
            .map(|file| file.etag.as_ref().map(|f| f.to_string()))
            .collect();
        let last_modifieds: Vec<String> = files
            .iter()
            .map(|file| {
                file.last_modified
                    .format("%Y-%m-%d %H:%M:%S.%3f %z")
                    .to_string()
            })
            .collect();
        let creators: Vec<Option<String>> = files
            .iter()
            .map(|file| file.creator.as_ref().map(|c| c.to_string()))
            .collect();

        let block = DataBlock::new_from_columns(vec![
            StringType::from_data(names),
            UInt64Type::from_data(sizes),
            StringType::from_opt_data(etags),
            StringType::from_data(last_modifieds),
            StringType::from_opt_data(creators),
        ]);

        Ok(Some(block))
    }