Makes and returns an example string in VW syntax.
        If given, 'response', 'importance', 'base', and 'tag' are used
        to label the example.  Features for the example come from
        any given features or namespaces, as well as any previously
        added namespaces (using them up in the process).

def make_line(self,
                  response=None,
                  importance=None,
                  base=None,
                  tag=None,
                  features=None,
                  namespaces=None,
                  ):
        """Makes and returns an example string in VW syntax.
        If given, 'response', 'importance', 'base', and 'tag' are used
        to label the example.  Features for the example come from
        any given features or namespaces, as well as any previously
        added namespaces (using them up in the process).
        """
        if namespaces is not None:
            self.add_namespaces(namespaces)
        if features is not None:
            namespace = Namespace(features=features)
            self.add_namespace(namespace)
        substrings = []
        tokens = []
        if response is not None:
            token = str(response)
            tokens.append(token)
            if importance is not None:  # Check only if response is given
                token = str(importance)
                tokens.append(token)
                if base is not None:  # Check only if importance is given
                    token = str(base)
                    tokens.append(token)
        if tag is not None: 
            token = "'" + str(tag)  # Tags are unambiguous if given a ' prefix
            tokens.append(token)
        else:
            token = ""  # Spacing element to avoid ambiguity in parsing
            tokens.append(token)
        substring = ' '.join(tokens)
        substrings.append(substring)
        if self.namespaces:
            for namespace in self.namespaces:
                substring = namespace.to_string()
                substrings.append(substring)
        else:
            substrings.append('')  # For correct syntax
        line = '|'.join(substrings)
        self._line = line
        self.namespaces = []  # Reset namespaces after their use
        return line