human
Complete this python program:
def deprecatedWorkerClassProperty(scope, prop, compat_name=None, new_name=None):
assistant
#Here is the Python code you requested.

    """Define compatibility class property.
    Can be used to create compatibility attribute for class property.
    :param scope: class scope (locals() in the context of a scope)
    :param prop: property object for which compatibility name should be
    created.
    :param compat_name: optional compatibility name (will be generated if not
    specified)
    :param new_name: optional new name (will be used name of attribute object
    in the module is not specified). If empty string is specified, then no
    new name is assumed for this attribute.
    """
    if (new_name is None):
        scope_keys = list(scope.keys())
        scope_values = list(scope.values())
        attribute_name = scope_keys[scope_values.index(prop)]
    else:
        attribute_name = new_name
    compat_name = _compat_name(attribute_name, compat_name=compat_name)
    if attribute_name:
        advice_msg = "use    '{0}'    instead".format(attribute_name)
    else:
        advice_msg = "don't    use    it"
    def get(self):
        reportDeprecatedWorkerNameUsage("'{old}'    property    is    deprecated,    {advice}.".format(old=compat_name, advice=advice_msg))
        return getattr(self, attribute_name)
    assert (compat_name not in scope)
    scope[compat_name] = property(get)