<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _jsonfileconstructor(self, filename=None, filepath=None, logger=None):
 """ Constructor method for the JsonFile object. :param filename: Name of the file :param filepath: Path to the file :param logger: Optional logger. :return: JsonFile """

        if filepath:
            path = filepath
        else:
            tc_path = os.path.abspath(os.path.join(inspect.getfile(self.bench.__class__),
                                                   os.pardir))
            path = os.path.abspath(os.path.join(tc_path, os.pardir, "session_data"))
        name = "default_file.json" if not filename else filename
        log = self.bench.logger if not logger else logger
        self.bench.logger.info("Setting json file location to: {}".format(path))
        return files.JsonFile(log, path, name)