input: Write a python function to calculate the correlation between artists based on their tag counts.
  assert calculate_artist_correlation([('art1', 'tag1', 90), ('art1', 'tag2', 80), ('art1', 'tag3', 60), ('art2', 'tag1', 80), ('art2', 'tag3', 90), ('art3', 'tag2', 90), ('art3', 'tag3', 80), ('art4', 'tag1', 50), ('art4', 'tag2', 70), ('art4', 'tag3', 70)])==[('art1', 'art2', 0.9970544855015815), ('art1', 'art3', 0.9733285267845752), ('art1', 'art4', 0.9983739949723253), ('art2', 'art3', 0.9819387480965713), ('art2', 'art4', 0.9958705948858226), ('art3', 'art4', 0.9707253433941514)]
  assert calculate_artist_correlation([('artistA', 'tag1', 50), ('artistA', 'tag2', 60), ('artistB', 'tag1', 70), ('artistB', 'tag2', 80), ('artistC', 'tag1', 60), ('artistC', 'tag2', 70)])==[('artistA', 'artistB', 0.9999999999999998), ('artistA', 'artistC', 1.0), ('artistB', 'artistC', 0.9999999999999998)]
output: def calculate_artist_correlation(data):
      from itertools import combinations
      import numpy as np
  
      # Create a dictionary to store tag counts for each artist
      artist_tags = {}
      for artist, tag, count in data:
          if artist not in artist_tags:
              artist_tags[artist] = {}
          artist_tags[artist][tag] = count
  
      # Get the list of all unique tags
      all_tags = list(set(tag for _, tag, _ in data))
  
      # Create vectors for each artist
      artist_vectors = {}
      for artist, tags in artist_tags.items():
          vector = [tags.get(tag, 0) for tag in all_tags]
          artist_vectors[artist] = vector
  
      # Function to calculate correlation
      def calculate_correlation(vec1, vec2):
          return np.corrcoef(vec1, vec2)[0, 1]
  
      # Calculate correlation for each pair of artists
      correlations = []
      for (artist1, vec1), (artist2, vec2) in combinations(artist_vectors.items(), 2):
          corr = calculate_correlation(vec1, vec2)
          correlations.append((artist1, artist2, corr))
  
      return correlations