Return the step as an dict that can be written to a yaml file.

        Returns:
            dict: yaml representation of the step.
964477
def to_obj(self, wd=False, pack=False, relpath=None):
        
        obj = CommentedMap()
        if pack:
            obj['run'] = self.orig
        elif relpath is not None:
            if self.from_url:
                obj['run'] = self.run
            else:
                obj['run'] = os.path.relpath(self.run, relpath)
        elif wd:
            if self.from_url:
                obj['run'] = self.run
            else:
                obj['run'] = os.path.basename(self.run)
        else:
            obj['run'] = self.run
        obj['in'] = self.step_inputs
        obj['out'] = self.output_names
        if self.is_scattered:
            obj['scatter'] = self.scattered_inputs
            # scatter_method is optional when scattering over a single variable
            if self.scatter_method is not None:
                obj['scatterMethod'] = self.scatter_method

        return obj
616661
def as_dict(self):
        
        return {"name": self.name,
                "@module": self.__class__.__module__,
                "@class": self.__class__.__name__}
1261013
def to_json(self):
    
    return {self.BLOB_KEY_PARAM: self._blob_key,
            self.START_INDEX_PARAM: self._start_index,
            self.END_INDEX_PARAM: self._end_index}
1293117
def write_options_to_YAML(self, filename):
        
        fd = open(filename, "w")
        yaml.dump(_options_to_dict(self.gc), fd, default_flow_style=False)
        fd.close()
365403
def to_dict(self):
        ''''''
        d = {'sequence': self.sequence,
                'targetComponent': self.target_component.to_dict()}
        props = []
        for name in self.properties:
            p = {'name': name}
            if self.properties[name]:
                p['value'] = str(self.properties[name])
            props.append(p)
        if props:
            d[RTS_EXT_NS_YAML + 'properties'] = props
        return d
454905
def to_dict(self):
        
        return {'n':self.n, 'delta':self.delta, 'K':self.K, 'centroids':self.centroids_to_list()}
835493
def gen_from_yaml_config(self, config_path: str) -> Iterator:
        
        if not config_path:
            return {}

        with open(config_path, 'r') as f:
            yaml_config = yaml.load(f)

        gen = map(lambda x: (x[0].upper(), x[1]), yaml_config.items())

        return gen
1287153
def to_dict(self):
        
        self_dict = {}
        for key, value in six.iteritems(self.__dict__):
            if self.allowed_params and key in self.allowed_params:
                self_dict[key] = value
        return self_dict
413790
def to_array(self):
        
        stepdef = {'bucket': self._bucket,
                   'tag': self._tag,
                   'keep': self._keep}
        return {'link': stepdef}
957718
def to_dict(self) -> Dict:
        
        return {
            "name": self.name,
            "dateCreated": str(self.dateCreated),
            "variables": lmap(
                lambda n: self.export_node(n), self.nodes(data=True)
            ),
            "timeStep": str(self.Δt),
            "edge_data": lmap(export_edge, self.edges(data=True)),
        }
155124
def to_dict(self):
        
        request_context_dict = {}
        if self.request_context:
            request_context_dict = self.request_context.to_dict()

        json_dict = {"httpMethod": self.http_method,
                     "body": self.body if self.body else None,
                     "resource": self.resource,
                     "requestContext": request_context_dict,
                     "queryStringParameters": dict(self.query_string_params) if self.query_string_params else None,
                     "headers": dict(self.headers) if self.headers else None,
                     "pathParameters": dict(self.path_parameters) if self.path_parameters else None,
                     "stageVariables": dict(self.stage_variables) if self.stage_variables else None,
                     "path": self.path,
                     "isBase64Encoded": self.is_base_64_encoded
                     }

        return json_dict
1254404
def to_dict(self):
        

        out_dict = {}

        out_dict['commands'] = self.commands
        out_dict['configs'] = self.configs
        out_dict['short_name'] = self.name
        out_dict['versions'] = {
            'module': self.module_version,
            'api': self.api_version
        }

        return out_dict
822739
def to_dict(self):
        
        return {
            'model_type': 'segmented_regression',
            'name': self.name,
            'segmentation_col': self.segmentation_col,
            'fit_filters': self.fit_filters,
            'predict_filters': self.predict_filters,
            'min_segment_size': self.min_segment_size,
            'default_config': {
                'model_expression': self.default_model_expr,
                'ytransform': YTRANSFORM_MAPPING[self.default_ytransform]
            },
            'fitted': self.fitted,
            'models': {
                yamlio.to_scalar_safe(name):
                    self._process_model_dict(m.to_dict())
                for name, m in self._group.models.items()}
        }
75976
def to_dict(self):
        

        return {
            'current': self.current,
            'first': self.first,
            'last': self.last,
            'next': self.more,
            'prev': self.prev,
        }
1229305
def to_dict(self):
        
        session = self._get_session()
        snapshot = self._get_snapshot()
        return {
            "session_id": session._session_id,
            "transaction_id": snapshot._transaction_id,
        }
908503
def info(self):
        
        return {
            'key': self.key,
            'processor': self.processor,
            'extractor': self.extractor,
            'output_path': self.output_path,
            'output_format': self.output_format,
            'template': self.template,
            'type': type(self)
        }
1014647
def as_dict(self):
        
        return {
            'module_path': str(self.module_path),
            'operator_name': self.operator_name,
            'occurrence': self.occurrence,
            'start_pos': self.start_pos,
            'end_pos': self.end_pos,
            'job_id': self.job_id,
        }