#NEWLINE# def instantiate_from( self , filename ) : #NEWLINE# #INDENT# datadir = ( os . environ . get ( 'FHIR_UNITTEST_DATADIR' ) or '' ) #NEWLINE# with io . open ( os . path . join ( datadir , filename ) , 'r' , encoding = 'utf-8' ) as handle : #NEWLINE# #INDENT# js = json . load ( handle ) #NEWLINE# self . assertEqual ( 'Device' , js [ 'resourceType' ] ) #NEWLINE# #UNINDENT# return device . Device ( js )