def is_valid_mpls_labels(labels):
 if (not isinstance(labels, (list, tuple))):
  return False
 for label in labels:
  if (not is_valid_mpls_label(label)):
   return False
 return True

def is_valid_mpls_labels ( labels ) : if ( not isinstance ( labels , ( list , tuple ) ) ) : return False for label in labels : if ( not is_valid_mpls_label ( label ) ) : return False return True
returns true if the given value is a list of valid mpls labels .