derive default labels from code and codes