def get_schema_for_field(field):
    """
    该方法必须确保field的schema实例化
    :param field:
    :return:
    """
    if hasattr(field, 'root'):
        return field.root
    else:
        return field.parent
