Loads/dumps container
        :return:
501306
async def container(self, container=None, container_type=None, params=None):
        
        if hasattr(container_type, "serialize_archive"):
            container = container_type() if container is None else container
            return await container.serialize_archive(
                self, elem=container, elem_type=container_type, params=params
            )

        if self.writing:
            return await self._dump_container(
                self.iobj, container, container_type, params
            )
        else:
            return await self._load_container(
                self.iobj, container_type, params=params, container=container
            )
332561
def dumps(self):
        
        return json.dumps([self.__class__.__name__.lower(), self._kwargs])
1325799
function load() {
	let r;
	try {
		r = exports.storage.getItem('debug');
	} catch (error) {
		// Swallow
		// XXX (@Qix-) should we be logging these?
	}

	// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
	if (!r && typeof process !== 'undefined' && 'env' in process) {
		r = process.env.DEBUG;
	}

	return r;
}
1332165
def load(self):
        
        stream = self.fs.load()
        stream = self.codec.decompress(stream)
        return stream
920581
async def container_load(self, container_type, params=None, container=None):
        
        raw_container = container_is_raw(container_type, params)
        c_len = await load_uvarint(self.iobj)
        elem_ver = await load_uvarint(self.iobj) if not raw_container else 0

        # if container and c_len != len(container):
        #     raise ValueError('Size mismatch')

        elem_type = x.container_elem_type(container_type, params)
        res = container if container else []
        for i in range(c_len):
            try:
                self.tracker.push_index(i)
                fvalue = await self._load_field(elem_type,
                                                params[1:] if params else None,
                                                x.eref(res, i) if container else None)
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e

            if not container:
                res.append(fvalue)
        return res
603326
async def container_dump(self, container, container_type, params=None):
        
        await self.container_size(len(container), container_type, params)

        elem_type = x.container_elem_type(container_type, params)
        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                await self._dump_field(elem, elem_type, params[1:] if params else None)
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e
474417
def _return_base_data(self, url, container, container_object=None,
                          container_headers=None, object_headers=None):
        
        headers = self.job_args['base_headers']
        headers.update({'X-Auth-Token': self.job_args['os_token']})

        _container_uri = url.geturl().rstrip('/')

        if container:
            _container_uri = '%s/%s' % (
                _container_uri, cloud_utils.quoter(container)
            )

        if container_object:
            _container_uri = '%s/%s' % (
                _container_uri, cloud_utils.quoter(container_object)
            )

        if object_headers:
            headers.update(object_headers)

        if container_headers:
            headers.update(container_headers)

        return headers, urlparse.urlparse(_container_uri)
1131226
def load(self, specfiles=None):
        
        if specfiles is None:
            specfiles = [_ for _ in viewkeys(self.info)]
        else:
            specfiles = aux.toList(specfiles)

        for specfile in specfiles:
            if specfile not in self.info:
                warntext = 'Error while calling "FiContainer.load()": "%s" is'\
                           ' not present in "FiContainer.info"!'\
                            % (specfile, )
                warnings.warn(warntext)
                continue
            else:
                fiPath = aux.joinpath(self.info[specfile]['path'],
                                      specfile+'.fic'
                                      )
                with zipfile.ZipFile(fiPath, 'r') as containerZip:
                    #Convert the zipfile data into a str object, necessary since
                    #containerZip.read() returns a bytes object.
                    jsonString = io.TextIOWrapper(containerZip.open('data'),
                                                  encoding='utf-8'
                                                  ).read()
                    #infoString = io.TextIOWrapper(containerZip.open('info'),
                    #                              encoding='utf-8'
                    #                              ).read()
                self.container[specfile] = json.loads(jsonString,
                                                      object_hook=Fi.jsonHook
                                                      )
756882
def inspect_container(self, container_alias):

        '''
            
        '''

        title = '%s.inspect_container' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'container_alias': container_alias
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # send inspect command
        import json
        sys_command = 'docker inspect %s' % container_alias
        output_dict = json.loads(self.command(sys_command))
        container_settings = output_dict[0]

        return container_settings
1313581
def __dump_compose_file(path, compose_result, success_msg, already_existed):
    '''
    
    '''
    ret = __dump_docker_compose(path,
                                compose_result['compose_content'],
                                already_existed)
    if isinstance(ret, dict):
        return ret
    return __standardize_result(True, success_msg,
                                compose_result['compose_content'], None)
203080
def load_from_path(self, filepath, container, **opts):
        
        root = ET.parse(filepath).getroot()
        nspaces = _namespaces_from_file(filepath)
        return root_to_container(root, container=container,
                                 nspaces=nspaces, **opts)
609433
def load_containers(self, service, configs, use_cache):
        
        if not isinstance(service, Service):
            raise TypeError("service must be and instance of service.  {0} was passed.".format(service))

        if not self.healthy():
            logger.error("unable to connect to container ship.")
            raise Exception('lost comms with our container ship')

        self._load_service_containers(service, configs, use_cache)
363903
def dump(self) -> dict:
        
        d = {}
        for item in self.__dict__:
            if item in ['parsed', 'dump', 'parse_data', 'iter_list', 'safe_load']:
                continue
            if isinstance(self.__dict__[item], ConfigKey):
                d[item] = self.__dict__[item].dump()
            elif isinstance(self.__dict__[item], list):
                d[item] = self.iter_list_dump(self.__dict__[item])
            else:
                d[item] = self.__dict__[item]
        return d
532449
def load_template():
    
    cloudformation, found = load_cloudformation_template()
    if not found:
        print(colored.red('could not load cloudformation.py, bailing out...'))
        sys.exit(1)
    return cloudformation
209319
def get_init_container(self,
                           init_command,
                           init_args,
                           env_vars,
                           context_mounts,
                           persistence_outputs,
                           persistence_data):
        """"""
        env_vars = to_list(env_vars, check_none=True)
        env_vars += [
            get_env_var(name=constants.CONFIG_MAP_JOB_INFO_KEY_NAME,
                        value=json.dumps(self.labels)),
        ]
        return client.V1Container(
            name=self.init_container_name,
            image=self.init_docker_image,
            image_pull_policy=self.init_docker_image_pull_policy,
            command=init_command,
            env=env_vars,
            args=init_args,
            volume_mounts=context_mounts)
879577
async def _dump_container(self, writer, container, container_type, params=None):
        
        await self._dump_container_size(writer, len(container), container_type)

        elem_type = container_elem_type(container_type, params)

        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                await self.dump_field(
                    writer, elem, elem_type, params[1:] if params else None
                )
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e
318878
def _load(self, reload=False):
        
        if self.autoreload or reload:
            # First, we load from YAML, failing if syntax errors are found
            options = self.storage_options or {}
            if hasattr(self.path, 'path') or hasattr(self.path, 'read'):
                file_open = self.path
                self.path = make_path_posix(
                    getattr(self.path, 'path',
                            getattr(self.path, 'name', 'file')))
            else:
                file_open = open_files(self.path, mode='rb', **options)
                assert len(file_open) == 1
                file_open = file_open[0]
            self._dir = get_dir(self.path)

            with file_open as f:
                text = f.read().decode()
            if "!template " in text:
                logger.warning("Use of '!template' deprecated - fixing")
                text = text.replace('!template ', '')
            self.parse(text)