def _expected_device(requested_device):
 prefix = '/dev/sd'
 if requested_device.startswith(prefix):
  return FilePath('/dev').child(('xvd' + requested_device[len(prefix):]))
 raise ValueError('Unsupported requested device {!r}'.format(requested_device))

def _expected_device ( requested_device ) : prefix = '/dev/sd' if requested_device . startswith ( prefix ) : return FilePath ( '/dev' ) . child ( ( 'xvd' + requested_device [ len ( prefix ) : ] ) ) raise ValueError ( 'Unsupported requested device {!r}' . format ( requested_device ) )
given a device we requested from aws ebs .