@staticmethod
    def _volume_bind_understands_mode():
        # docker.utils.convert_volume_binds() understands 'mode' since docker-py-1.3.0
        # returns ['/a/:/b/:rw'] with docker-py < 1.3.0 and ['/a/:/b/:ro,Z'] with >= 1.3.0
        bind = docker.utils.convert_volume_binds({'/a/': {'bind': '/b/', 'mode': 'ro,Z'}})
        if bind and len(bind[0].split(':')) > 2 and bind[0].split(':')[2] == 'ro,Z':
            return True
        return False
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/core.py/BuildContainerFactory._volume_bind_understands_mode/original