def METHOD_NAME(self):
    """
    Retrieves the Meilisearch master key, either from the Platform.sh environment or locally.
    """
    config = Config()
    if config.is_valid_platform():
        return config.projectEntropy
    elif os.environ.get("MEILI_MASTER_KEY"):
        return os.environ["MEILI_MASTER_KEY"]
    else:
        return self.default["key"]