human
Complete the below
@LRUCache(maxtime=CONTAINER_POLICY_TTL)
def direct_get_container_policy_index(container_ring, account_name, container_name):

    ''''Talk directly to the primary container servers to figure out the storage
    policy index for a given container.
    :param container_ring: ring in which to look up the container locations
    :param account_name: name of the container\'s account
    :param container_name: name of the container
    :returns: storage policy index, or None if it couldn\'t get a majority'
    '''
 ... Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def _eat_client_exception(*args):
        try:
            return direct_head_container(*args)
        except ClientException as err:
            if (err.http_status == 404):
                return err.http_headers
        except (Timeout, socket.error):
            pass
    pile = GreenPile()
    (part, nodes) = container_ring.get_nodes(account_name, container_name)
    for node in nodes:
        pile.spawn(_eat_client_exception, node, part, account_name, container_name)
    headers = [x for x in pile if (x is not None)]
    if (len(headers) < majority_size(len(nodes))):
        return
    return best_policy_index(headers)