def _build_id_tuple(params, spec):
 if (spec is None):
  return (None, None)
 required_class = spec.class_
 required_tag = spec.tag
 tag_type = params.get(u'tag_type', spec.tag_type)
 if (tag_type is not None):
  required_class = 2
 required_class = params.get(u'class_', required_class)
 required_tag = params.get(u'tag', required_tag)
 return (required_class, required_tag)

def _build_id_tuple ( params , spec ) : if ( spec is None ) : return ( None , None ) required_class = spec . class_ required_tag = spec . tag tag_type = params . get ( u'tag_type' , spec . tag_type ) if ( tag_type is not None ) : required_class = 2 required_class = params . get ( u'class_' , required_class ) required_tag = params . get ( u'tag' , required_tag ) return ( required_class , required_tag )
builds a 2-element tuple used to identify fields by grabbing the class_ and tag from an asn1value class and the params dict being passed to it .