def code_to_md(source, metadata, language):
    """
    Represent a code cell with given source and metadata as a md cell
    :param source:
    :param metadata:
    :param language:
    :return:
    """
    options = []
    if language:
        options.append(language)
    if 'name' in metadata:
        options.append(metadata['name'])
    return ['```{}'.format(' '.join(options))] + source + ['```']
