code: def get_foreign_id(self, idspace='musicbrainz', cache=True):
          
          if not (cache and ('foreign_ids' in self.cache) and filter(lambda d: d.get('catalog') == idspace, self.cache['foreign_ids'])):
              response = self.get_attribute('profile', bucket=['id:'+idspace])
              foreign_ids = response['artist'].get("foreign_ids", [])
              self.cache['foreign_ids'] = self.cache.get('foreign_ids', []) + foreign_ids
          cval = filter(lambda d: d.get('catalog') == util.map_idspace(idspace),
                        self.cache.get('foreign_ids'))
          return cval[0].get('foreign_id') if cval else None
docs: Get the foreign id for this artist for a specific id space
          
          Args:
          
          Kwargs:
              idspace (str): A string indicating the idspace to fetch a foreign id for.
          
          Returns:
              A foreign ID string
          
          Example:
          
          >>> a = artist.Artist('fabulous')
          >>> a.get_foreign_id('7digital')
          u'7digital:artist:186042'
          >>>