# File lib/t/cli.rb, line 421
    def friends(user=nil)
      if user
        user = if options['id']
          user.to_i
        else
          user.strip_ats
        end
      end
      following_ids = collect_with_cursor do |cursor|
        client.friend_ids(user, :cursor => cursor)
      end
      follower_ids = collect_with_cursor do |cursor|
        client.follower_ids(user, :cursor => cursor)
      end
      friend_ids = (following_ids & follower_ids)
      users = friend_ids.in_groups_of(MAX_USERS_PER_REQUEST, false).threaded_map do |friend_id_group|
        retryable(:tries => 3, :on => Twitter::Error::ServerError, :sleep => 0) do
          client.users(friend_id_group)
        end
      end.flatten
      print_users(users)
    end