@property
    def function(self):
        """
        The function pointed to by the path_str attribute.

        Returns:
            A handle to a Python function or None if function is not valid.
        """
        if not self._function and self._valid is None:
            try:
                # Split into parts and extract function name
                module_path, function_name = self.path.rsplit('.', 1)

                #Pre-process handler path
                full_module_path = '.'.join((self.PATH_PREFIX, module_path))

                # Import module
                module = __import__(full_module_path, fromlist=[function_name])
            except (__HOLE__, ImportError):
                self._valid = False
            else:
                # Get the function
                self._function = getattr(module, function_name)
                self._valid = True

        return self._function
dataset/ETHPy150Open tethysplatform/tethys/tethys_apps/base/persistent_store.py/TethysFunctionExtractor.function