def match_dhcp_options(vpc_conn, tags=None, options=None):
 dhcp_options = vpc_conn.get_all_dhcp_options()
 for dopts in dhcp_options:
  if ((not tags) or (get_resource_tags(vpc_conn, dopts.id) == tags)):
   if ((not options) or (dopts.options == options)):
    return (True, dopts)
 return (False, None)

def match_dhcp_options ( vpc_conn , tags = None , options = None ) : dhcp_options = vpc_conn . get_all_dhcp_options ( ) for dopts in dhcp_options : if ( ( not tags ) or ( get_resource_tags ( vpc_conn , dopts . id ) == tags ) ) : if ( ( not options ) or ( dopts . options == options ) ) : return ( True , dopts ) return ( False , None )
finds a dhcp options object that optionally matches the tags and options provided .