parameters: (msg_context, spec)
return_statement: return buff.getvalue().strip()
docstring: Compute the text used for md5 calculation. MD5 spec states that we
      removes comments and non-meaningful whitespace. We also strip
      packages names from type names. For convenience sake, constants are
      reordered ahead of other declarations, in the order that they were
      originally defined.
  
      :returns: text for ROS MD5-processing, ``str``
docstring_summary: Compute the text used for md5 calculation. MD5 spec states that we
      removes comments and non-meaningful whitespace. We also strip
      packages names from type names. For convenience sake, constants are
      reordered ahead of other declarations, in the order that they were
      originally defined.
docstring_tokens: Compute the text used for md5 calculation . MD5 spec states that we removes comments and non - meaningful whitespace . We also strip packages names from type names . For convenience sake constants are reordered ahead of other declarations in the order that they were originally defined .
function: def compute_md5_text(msg_context, spec):
      """
      Compute the text used for md5 calculation. MD5 spec states that we
      removes comments and non-meaningful whitespace. We also strip
      packages names from type names. For convenience sake, constants are
      reordered ahead of other declarations, in the order that they were
      originally defined.
  
      :returns: text for ROS MD5-processing, ``str``
      """
      package = spec.package
  
      buff = StringIO()    
  
      for c in spec.constants:
          buff.write("%s %s=%s\n"%(c.type, c.name, c.val_text))
      for type_, name in zip(spec.types, spec.names):
          msg_type = bare_msg_type(type_)
          # md5 spec strips package names
          if is_builtin(msg_type):
              buff.write("%s %s\n"%(type_, name))
          else:
              # recursively generate md5 for subtype.  have to build up
              # dependency representation for subtype in order to
              # generate md5
              sub_pkg, _ = names.package_resource_name(msg_type)
              sub_pkg = sub_pkg or package
              sub_spec = msg_context.get_registered(msg_type)
              sub_md5 = compute_md5(msg_context, sub_spec)
              buff.write("%s %s\n"%(sub_md5, name))
      
      return buff.getvalue().strip()
function_tokens: def compute_md5_text ( msg_context , spec ) : package = spec . package buff = StringIO ( ) for c in spec . constants : buff . write ( "%s %s=%s\n" % ( c . type , c . name , c . val_text ) ) for type_ , name in zip ( spec . types , spec . names ) : msg_type = bare_msg_type ( type_ ) # md5 spec strips package names if is_builtin ( msg_type ) : buff . write ( "%s %s\n" % ( type_ , name ) ) else : # recursively generate md5 for subtype.  have to build up # dependency representation for subtype in order to # generate md5 sub_pkg , _ = names . package_resource_name ( msg_type ) sub_pkg = sub_pkg or package sub_spec = msg_context . get_registered ( msg_type ) sub_md5 = compute_md5 ( msg_context , sub_spec ) buff . write ( "%s %s\n" % ( sub_md5 , name ) ) return buff . getvalue ( ) . strip ( )