code: def generate_unique_key(master_key_path, url):
      
      with open(master_key_path, 'r') as f:
          master_key = f.read()
      assert len(master_key) == 32, 'Invalid Key! Must be 32 characters. ' \
                                    'Key: {}, Length: {}'.format(master_key, len(master_key))
      new_key = hashlib.sha256(master_key + url).digest()
      assert len(new_key) == 32, 'New key is invalid and is not 32 characters: {}'.format(new_key)
      return new_key
docs: Input1: Path to the BD2K Master Key (for S3 Encryption)
      Input2: S3 URL (e.g. https://s3-us-west-2.amazonaws.com/cgl-driver-projects-encrypted/wcdt/exome_bams/DTB-111-N.bam)
  
      Returns: 32-byte unique key generated for that URL