<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_datacenter(content, obj):
    '''
    Get the datacenter to whom an object belongs
    '''
    datacenters = content.rootFolder.childEntity
    for d in datacenters:
        dch = get_all(content, d, type(obj))
        if dch is not None and obj in dch:
            return d