def __init__(self, internal: InternalFrame, storage_level: Optional[StorageLevel]=None):
    if (storage_level is None):
        object.__setattr__(self, '_cached', internal.spark_frame.cache())
    elif isinstance(storage_level, StorageLevel):
        object.__setattr__(self, '_cached', internal.spark_frame.persist(storage_level))
    else:
        raise TypeError('Only a valid pyspark.StorageLevel type is acceptable for the `storage_level`')
    super().__init__(internal)
def __init__(self, internal: InternalFrame, storage_level: Optional[StorageLevel]=None):
    if (storage_level is None):
        object.__setattr__(self, '_cached', internal.spark_frame.cache())
    elif isinstance(storage_level, StorageLevel):
        object.__setattr__(self, '_cached', internal.spark_frame.persist(storage_level))
    else:
        raise TypeError('Only a valid pyspark.StorageLevel type is acceptable for the `storage_level`')
    super().__init__(internal)