code: def gabc(key, value, fmt, meta):                   # pylint:disable=I0011,W0613
      
      if key == 'Code':
          [[ident, classes, kvs], contents] = value  # pylint:disable=I0011,W0612
          kvs = {key: value for key, value in kvs}
          if "gabc" in classes:
              if fmt == "latex":
                  if ident == "":
                      label = ""
                  else:
                      label = '\\label{' + ident + '}'
                  return latex(
                      "\n\\smallskip\n{%\n" +
                      latexsnippet('\\gregorioscore{' + contents + '}', kvs) +
                      "%\n}" +
                      label
                  )
              else:
                  infile = contents + (
                      '.gabc' if '.gabc' not in contents else ''
                  )
                  with open(infile, 'r') as doc:
                      code = doc.read().split('%%\n')[1]
                  return [Image(['', [], []], [], [
                      png(
                          contents,
                          latexsnippet('\\gregorioscore', kvs)
                      ),
                      ""
                  ])]
      elif key == 'CodeBlock':
          [[ident, classes, kvs], contents] = value
          kvs = {key: value for key, value in kvs}
          if "gabc" in classes:
              if fmt == "latex":
                  if ident == "":
                      label = ""
                  else:
                      label = '\\label{' + ident + '}'
                  return [latexblock(
                      "\n\\smallskip\n{%\n" +
                      latexsnippet('\\gabcsnippet{' + contents + '}', kvs) +
                      "%\n}" +
                      label
                      )]
              else:
                  return Para([Image(['', [], []], [], [
                      png(
                          contents,
                          latexsnippet('\\gabcsnippet', kvs)
                      ),
                      ""
                  ])])
docs: Handle gabc file inclusion and gabc code block.