def METHOD_NAME(self, path=None):
    """
    Load settings from a file on disk. If an explicit file is not specified,
    the following locations will be searched for a settings file, and the
    first one found will be loaded:
    * An rmgrc file in the current working directory
    * An rmgrc file in the user's $HOME/.rmg directory
    * An rmgrc file in the same directory as this package
    If none of these can be found, a SettingsError is raised.
    """
    # First set all settings to their default values
    self.reset()
    if path:
        # The user specified an explicit file to use for the settings
        # Make sure that it exists, fail if it does not
        if not os.path.exists(path):
            raise SettingsError('Specified RMG settings file "{0}" does not exist.'.format(path))
        else:
            self.filename = path
    else:
        # The user did not specify an explicit file to use for the settings
        # Load one of the default settings files instead
        working_dir = os.path.abspath(os.path.dirname(__file__))
        if os.path.exists("rmgrc"):
            self.filename = "rmgrc"
        elif os.path.exists(os.path.expanduser("~/.rmg/rmgrc")):
            self.filename = os.path.expanduser("~/.rmg/rmgrc")
        elif os.path.exists(os.path.join(working_dir, "rmgrc")):
            self.filename = os.path.join(working_dir, "rmgrc")
        else:
            return  # fail silently, instead of raising an error
    # From here on we assume that we have identified the appropriate
    # settings file to load
    with open(self.filename, "r") as f:
        for line in f:
            # Remove any comments from the line
            index = line.find("#")
            if index != -1:
                line = line[:index]
            # Is there a key-value pair remaining?
            if line.find("database.directory") != -1:
                value = line.split()[-1]  # Get the last token from this line
                value = value.strip()
                self["database.directory"] = value
                self.sources["database.directory"] = "from {0}".format(self.filename)
            elif line.find("test_data.directory") != -1:
                value = line.split()[-1]  # Get the last token from this line
                value = value.strip()
                self["test_data.directory"] = value
                self.sources["test_data.directory"] = "from {0}".format(self.filename)