<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_output_jsonpath(self, sub_output=None):
 """Attempt to build a JSONPath filter for this ExtractorProcessor that captures how to get at the outputs of the wrapped Extractor"""

        output_jsonpath_field = self.get_output_jsonpath_field(sub_output)

        metadata = self.extractor.get_metadata()
        metadata['source'] = str(self.input_fields)
        extractor_filter = ""
        is_first = True
        for key, value in metadata.iteritems():
            if is_first:
                is_first = False
            else:
                extractor_filter = extractor_filter + " & "

            if isinstance(value, basestring):
                extractor_filter = extractor_filter\
                    + "{}=\"{}\"".format(key,
                                         re.sub('(?<=[^\\\])\"', "'", value))
            elif isinstance(value, types.ListType):
                extractor_filter = extractor_filter\
                    + "{}={}".format(key, str(value))
        output_jsonpath = "{}[?{}].result.value".format(
            output_jsonpath_field, extractor_filter)

        return output_jsonpath