input: Write a python function to parse metadata.csv files from a specified SIPPath into a dictionary of filenames and their metadata.
  assert 'objects/foo.jpg' in parseMetadata('/path/to/sip')['objects/foo.jpg'] == collections.OrderedDict([('dc.title', ['Foo']), ('dc.type', ['Photograph', 'Still Image']), ('Other metadata', ['Taken on a sunny day'])])
  assert 'objects/bar' in parseMetadata('/path/to/sip')['objects/bar'] == collections.OrderedDict([('dc.title', ['Bar']), ('dc.type', ['Photograph', 'Still Image']), ('Other metadata', ['All taken on a rainy day'])])
  assert parseMetadata('/invalid/path') == {}
output: import csv
  import collections
  import os
  
  def parseMetadata(SIPPath):
      metadata_dict = {}
      metadata_file_path = os.path.join(SIPPath, 'metadata.csv')
      
      if not os.path.exists(metadata_file_path):
          return metadata_dict
      
      with open(metadata_file_path, mode='r', encoding='utf-8') as csvfile:
          reader = csv.DictReader(csvfile)
          for row in reader:
              filename = row.pop('filename')
              metadata_dict[filename] = collections.OrderedDict()
              for key, value in row.items():
                  metadata_dict[filename][key] = value.split('|')
      
      return metadata_dict