def SetTransitiveQuery(unused_ref, args, request):
  """Sets query paremeters to request.query.

  Args:
    unused_ref: unused.
    args: The argparse namespace.
    request: The request to modify.

  Returns:
    The updated request.
  """
  params = []

  if hasattr(args, 'member_email') and args.IsSpecified('member_email'):
    params.append("member_key_id=='{}'".format(args.member_email))

  if hasattr(args, 'labels') and args.IsSpecified('labels'):
    params.append("'{}' in labels".format(args.labels))

  request.query = '&&'.join(params)

  return request