<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_expression_target(expression: Expression, expr_vars: InheritedDict) -> BindingTarget:
    '''Factory method to create expression target'''
    root = expression.get_object_tree()
    if len(root.children) != 1 or not PROPERTY_EXPRESSION_REGEX.fullmatch(expression.code):
        error = BindingError('Expression should be property expression')
        error.add_info('Expression', expression.code)
        raise error
    if root.children[0].children:
        return PropertyExpressionTarget(expression, expr_vars)
    return GlobalValueExpressionTarget(expression, expr_vars)