def GetIPListByCom(APCG, IPSet=None):
    """
	Return a list of APCG nodes sorted by communication requirements.
	"""
    DegreeDict = APCG.degree()
    SortedIPList = sorted(DegreeDict, key=DegreeDict.get, reverse=True)
    if IPSet is None:
        return SortedIPList
    else:
        return list(filter(lambda x: x in IPSet, SortedIPList))
