parameters: (kernel_info)
return_statement: return expand_info
docstring: Convert the json into a more friendly format
docstring_summary: Convert the json into a more friendly format
docstring_tokens: Convert the json into a more friendly format
function: def extract_expand_info(kernel_info):
      """Convert the json into a more friendly format"""
      input_desc = []
      if 'input_desc' in kernel_info and kernel_info['input_desc']:
          for desc in kernel_info['input_desc']:
              input_desc += desc
      attrs = {}
      if 'attr' in kernel_info and kernel_info['attr']:
          for attr in kernel_info["attr"]:
              attrs[attr["name"]] = attr["value"]
      expand_info = {
          "name": kernel_info["name"],
          "input_desc": input_desc,
          "output_desc": kernel_info["output_desc"],
          "attr": attrs,
          "process": kernel_info["process"],
      }
      return expand_info
function_tokens: def extract_expand_info ( kernel_info ) : input_desc = [ ] if 'input_desc' in kernel_info and kernel_info [ 'input_desc' ] : for desc in kernel_info [ 'input_desc' ] : input_desc += desc attrs = { } if 'attr' in kernel_info and kernel_info [ 'attr' ] : for attr in kernel_info [ "attr" ] : attrs [ attr [ "name" ] ] = attr [ "value" ] expand_info = { "name" : kernel_info [ "name" ] , "input_desc" : input_desc , "output_desc" : kernel_info [ "output_desc" ] , "attr" : attrs , "process" : kernel_info [ "process" ] , } return expand_info