protected static function buildFromTraversable(Traversable $data): Structure
    {
        $is_map = false;

        // Traverse through the data, but only check the first item's key
        foreach ($data as $key => &$val) {
            $is_map = $is_map || !is_int($key);

            $val = self::attemptBuildTraversableLike($val);
        }

        if ($is_map) {
            return Map::fromTraversable($data);
        }

        return FixedList::fromTraversable($data);
    }