Easy answer - LISTENING!!! You need to listen to the type of traffic, addresses given, call signs used, and sometimes the RID/UID of the units. You also need to pay attention to the TG ranges of known agencies (based on RR database) and RID/UIDs in use by those various agencies. All those elements help you narrow down who is using the TG and what the usage is for. Over time you get used to it and can figure it out and submit it to the database. One suggestion I sometimes use, if you think you know it post it on your state/local forum for feedback before you submit it. For example if someone told me they heard Sanford police unit using TG 60660 on my state system and they thought it was a Sanford PD TG, we would know that wasn't accurate because that is a TG in the federal range.