@contextmanager
def open(self, flag='rb'):
    "Open the gulp chunk for reading.\n\n        Parameters\n        ----------\n        flag: str\n            'rb': Read binary\n            'wb': Write binary\n            'ab': Append to binary\n\n        Notes\n        -----\n        Works as a context manager but returns None.\n\n        "
    if (flag in ['wb', 'rb', 'ab']):
        self.fp = open(self.data_file_path, flag)
    else:
        m = "This file does not support the mode: '{}'".format(flag)
        raise NotImplementedError(m)
    (yield)
    if (flag in ['wb', 'ab']):
        self.flush()
    self.fp.close()
Open the gulp chunk for reading.

Parameters
----------
flag: str
    'rb': Read binary
    'wb': Write binary
    'ab': Append to binary

Notes
-----
Works as a context manager but returns None.
@contextmanager
def open(self, flag='rb'):
    "Open the gulp chunk for reading.\n\n        Parameters\n        ----------\n        flag: str\n            'rb': Read binary\n            'wb': Write binary\n            'ab': Append to binary\n\n        Notes\n        -----\n        Works as a context manager but returns None.\n\n        "
    if (flag in ['wb', 'rb', 'ab']):
        self.fp = open(self.data_file_path, flag)
    else:
        m = "This file does not support the mode: '{}'".format(flag)
        raise NotImplementedError(m)
    (yield)
    if (flag in ['wb', 'ab']):
        self.flush()
    self.fp.close()