def frame_is_relevant(entity, frame):
 if (frame.get('source_addr_long') != entity.config.address):
  return False
 if ('samples' not in frame):
  return False
 return True

def frame_is_relevant ( entity , frame ) : if ( frame . get ( 'source_addr_long' ) != entity . config . address ) : return False if ( 'samples' not in frame ) : return False return True
test whether the frame is relevant to the entity .