<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def by_name(queryset, name=None):
 """ Filter queryset by name, with word wide auto-completion """

  if name:
    queryset = queryset.filter(name=name)
  return queryset