<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def show(self, brief=False):
 """ Show metadata for each path given """

        output = []
        for path in self.options.paths or ["."]:
            if self.options.verbose:
                utils.info("Checking {0} for metadata.".format(path))
            tree = fmf.Tree(path)
            for node in tree.prune(
                    self.options.whole, self.options.keys, self.options.names,
                    self.options.filters):
                if brief:
                    show = node.show(brief=True)
                else:
                    show = node.show(
                        brief=False,
                        formatting=self.options.formatting,
                        values=self.options.values)
                # List source files when in debug mode
                if self.options.debug:
                    for source in node.sources:
                        show += utils.color("{0}\n".format(source), "blue")
                if show is not None:
                    output.append(show)

        # Print output and summary
        if brief or self.options.formatting:
            joined = "".join(output)
        else:
            joined = "\n".join(output)
        try: # pragma: no cover
            print(joined, end="")
        except UnicodeEncodeError: # pragma: no cover
            print(joined.encode('utf-8'), end="")
        if self.options.verbose:
            utils.info("Found {0}.".format(
                utils.listed(len(output), "object")))
        self.output = joined