code: def _maybe_init_metadata_dir_by_name(self, name):
      
      safe_mkdir(self.__class__._get_metadata_dir_by_name(name, self._metadata_base_dir))
docs: Initialize the metadata directory for a named identity if it doesn't exist.