Port a trained estimator to the syntax of a chosen programming
        language.

        Parameters
        ----------
        :param class_name : string
            The name of the class in the returned result.
        :param method_name : string
            The name of the method in the returned result.
        :param export_data : bool, default: False
            Whether the model data should be saved or not.
        :param export_dir : string, default: '.' (current directory)
            The directory where the model data should be saved.
        :param export_filename : string, default: 'data.json'
            The filename of the exported model data.
        :param export_append_checksum : bool, default: False
            Whether to append the checksum to the filename or not.
        :param embed_data : bool, default: False
            Whether the model data should be embedded in the template or not.

        Returns
        -------
        :return : string
            The transpiled algorithm with the defined placeholders.

def export(self, class_name, method_name, export_data=False,
               export_dir='.', export_filename='data.json',
               export_append_checksum=False, embed_data=False, **kwargs):
        """
        Port a trained estimator to the syntax of a chosen programming
        language.

        Parameters
        ----------
        :param class_name : string
            The name of the class in the returned result.
        :param method_name : string
            The name of the method in the returned result.
        :param export_data : bool, default: False
            Whether the model data should be saved or not.
        :param export_dir : string, default: '.' (current directory)
            The directory where the model data should be saved.
        :param export_filename : string, default: 'data.json'
            The filename of the exported model data.
        :param export_append_checksum : bool, default: False
            Whether to append the checksum to the filename or not.
        :param embed_data : bool, default: False
            Whether the model data should be embedded in the template or not.

        Returns
        -------
        :return : string
            The transpiled algorithm with the defined placeholders.
        """
        # Arguments:
        self.class_name = class_name
        self.method_name = method_name

        # Estimator:
        est = self.estimator

        self.n_features = est.n_features_
        self.n_classes = len(self.estimator.tree_.value.tolist()[0][0])

        temp_arr_scope = self.temp('arr_scope')
        temp_arr_ = self.temp('arr[]')
        temp_arr__ = self.temp('arr[][]')

        left_childs = [str(e) for e in self.estimator.tree_.children_left]
        left_childs = temp_arr_.format(type='int', name='lChilds',
                                       values=', '.join(left_childs),
                                       n=len(left_childs))
        self.left_childs = left_childs

        right_childs = [str(e) for e in self.estimator.tree_.children_right]
        right_childs = temp_arr_.format(type='int', name='rChilds',
                                        values=', '.join(right_childs),
                                        n=len(right_childs))
        self.right_childs = right_childs

        thresholds = [self.repr(e) for e in
                      self.estimator.tree_.threshold.tolist()]
        type_ = 'float64' if self.target_language == 'go' else 'double'
        thresholds = temp_arr_.format(type=type_, name='thresholds',
                                      values=', '.join(thresholds),
                                      n=len(thresholds))
        self.thresholds = thresholds

        indices = [str(e) for e in self.estimator.tree_.feature]
        indices = temp_arr_.format(type='int', name='indices',
                                   values=', '.join(indices), n=len(indices))
        self.indices = indices

        classes = self.estimator.tree_.value.tolist()
        n = len(classes)
        m = self.n_classes
        classes = [', '.join([str(int(x)) for x in e[0]]) for e in classes]
        classes = ', '.join([temp_arr_scope.format(v) for v in classes])
        classes = temp_arr__.format(type='int', name='classes', values=classes,
                                    n=n, m=m)
        self.classes = classes

        if self.target_method == 'predict':
            # Exported:
            if export_data and os.path.isdir(export_dir):
                self.export_data(export_dir, export_filename,
                                 export_append_checksum)
                return self.predict('exported')
            # Embedded:
            if embed_data:
                return self.predict('embedded')
            # Separated:
            return self.predict('separated')