input: Write a python function to extract named entities from a given text using spacy.
  assert extract_entities("The President Barack Obama was born in Hawaii.") == {'The President': 'ORG', 'Barack Obama': 'PERSON', 'Hawaii': 'GPE'}
  assert extract_entities("Apple is looking at buying U.K. startup for $1 billion.") == {'Apple': 'ORG', 'U.K.': 'GPE', '$1 billion': 'MONEY'}
  assert extract_entities("San Francisco considers banning sidewalk delivery robots.") == {'San Francisco': 'GPE'}
output: def extract_entities(text):
      import spacy
      nlp = spacy.load("en_core_web_sm")
      doc = nlp(text)
      entities = {}
      for ent in doc.ents:
          entities[ent.text] = ent.label_
      return entities