@classmethod
def create(cls, filename, metadata, version=None):
    """Create a new MBTiles file. See `Metadata`"""
    if version is None:
        version = cls.Metadata._detect(keys=list(metadata.keys()))
    mbtiles = cls._create(filename=filename, version=version)
    mbtiles.metadata._setup(metadata)
    return mbtiles
