def get_datastore(self, ds_name, profile=None, config=None):
        validate_true(ds_name, 'ds_name must be provided')
        if (ds_name, profile) in self._datastores:
            log.debug("get_datastore(): Found instance of store '%s' (profile=%s)" % (ds_name, profile))
            return self._datastores[(ds_name, profile)]

        # Create a datastore instance
        log.info("get_datastore(): Create instance of store '%s' as database=%s (profile=%s)" % (ds_name, ds_name, profile))
        new_ds = DatastoreManager.get_datastore_instance(ds_name, profile)

        # Create store if not existing
        if not new_ds.datastore_exists(ds_name):
            new_ds.create_datastore(ds_name, create_indexes=True, profile=profile)
        else:
            # NOTE: This may be expensive if called more than once per container
            # If views exist and are dropped and recreated
            new_ds.define_profile_views(profile=profile, keepviews=True)

        # Set a few standard datastore instance fields
        new_ds.local_name = ds_name
        new_ds.ds_profile = profile

        self._datastores[(ds_name, profile)] = new_ds

        return new_ds
Human readable representation of this object
dataset/ETHPy150Open ooici/pyon/pyon/datastore/datastore.py/DatastoreManager.get_datastore--crossover with--dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/base.py/Parselmouth.__str__