<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_properties(obj):
 """ Get values of all properties in specified object and its subobjects and returns them as a map. The object can be a user defined object, map or array. Returned properties correspondently are object properties, map key-pairs or array elements with their indexes. :param obj: an object to get properties from. :return: a map, containing the names of the object's properties and their values. """

        properties = {}
        
        if obj != None:
            cycle_detect = []
            RecursiveObjectReader._perform_get_properties(obj, None, properties, cycle_detect)

        return properties