def get_tensor_parents_placeholders(tensor):
    """ Get all placeholders that is depending the given tensor. """
    placeholders_list = []
    if tensor.op.type == 'Placeholder':
        placeholders_list.append(tensor)
    if tensor.op:
        for t in tensor.op.inputs:
            if not 'read:0' in t.name:
                placeholders_list += get_tensor_parents_placeholders(t)
    return list(set(placeholders_list))