def __init__(self, sassession, libref, table, results='', dsopts: dict=None):
    self.sas = sassession
    self.logger = logging.getLogger(__name__)
    if (results == ''):
        results = sassession.results
    failed = 0
    if (results.upper() == 'HTML'):
        if (self.sas.sascfg.display.lower() == 'jupyter'):
            try:
                from IPython.display import HTML
            except:
                failed = 1
            if (failed and (not self.sas.batch)):
                self.HTML = 0
            else:
                self.HTML = 1
        else:
            self.HTML = 1
    else:
        self.HTML = 0
    if len(libref):
        self.libref = libref
    else:
        if self.sas.exist(table, libref='user'):
            self.libref = 'USER'
        else:
            self.libref = 'WORK'
        if (self.sas.sascfg.mode == 'HTTP'):
            self.libref = 'WORK'
    self.table = table
    self.dsopts = (dsopts if (dsopts is not None) else {})
    self.results = results
    self.tabulate = sp2.Tabulate(sassession, self)
def __init__(self, sassession, libref, table, results=, dsopts: dict=None):
    self.sas = sassession
    self.logger = logging.getLogger(__name__)
    if (results == ):
        results = sassession.results
    failed = 0
    if (results.upper() == 'HTML'):
        if (self.sas.sascfg.display.lower() == 'jupyter'):
            try:
                from IPython.display import HTML
            except:
                failed = 1
            if (failed and (not self.sas.batch)):
                self.HTML = 0
            else:
                self.HTML = 1
        else:
            self.HTML = 1
    else:
        self.HTML = 0
    if len(libref):
        self.libref = libref
    else:
        if self.sas.exist(table, libref='user'):
            self.libref = 'USER'
        else:
            self.libref = 'WORK'
        if (self.sas.sascfg.mode == 'HTTP'):
            self.libref = 'WORK'
    self.table = table
    self.dsopts = (dsopts if (dsopts is not None) else {})
    self.results = results
    self.tabulate = sp2.Tabulate(sassession, self)