<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_published(queryset, published_string='true'):
 """ Filter queryset by publish status """

  if published_string == 'true':
    queryset = queryset.filter(published=1)
  elif published_string == 'false':
    queryset = queryset.filter(published=0)
  # Any other value will return both published and unpublished
  return queryset