def METHOD_NAME(self, writeable):
    if not isinstance(
        writeable, (pygit2.Tree, pygit2.Blob, bytes, bytearray, type(None))
    ):
        raise ValueError(f"Expected a writeable type but found {type(writeable)}")