nodes: 0, module; 1, function_definition; 2, function_name:get_schemas; 3, parameters; 4, block; 5, identifier:cls; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, if_statement; 12, return_statement; 13, identifier:schema_types; 14, None; 15, identifier:sort; 16, True; 17, comment:"""
          Get schemas by type. If ``schema_type`` is None, return all schemas
  
          :param schema_types: list of schema types
          :type schema_types: list or None
          :param bool sort: sort by name
          :return: list of schemas
          :rtype: list
          """; 18, assignment; 19, identifier:schema_types; 20, block; 21, identifier:sort; 22, block; 23, identifier:result; 24, identifier:result; 25, call; 26, expression_statement; 27, expression_statement; 28, identifier:filter; 29, argument_list; 30, assignment; 31, assignment; 32, lambda; 33, call; 34, identifier:result; 35, call; 36, identifier:result; 37, call; 38, lambda_parameters; 39, not_operator; 40, attribute; 41, argument_list; 42, identifier:filter; 43, argument_list; 44, identifier:sorted; 45, argument_list; 46, identifier:x; 47, attribute; 48, attribute; 49, identifier:values; 50, lambda; 51, identifier:result; 52, identifier:result; 53, keyword_argument; 54, identifier:x; 55, identifier:is_inline_array; 56, identifier:cls; 57, identifier:_schemas; 58, lambda_parameters; 59, comparison_operator:x.schema_type in schema_types; 60, identifier:key; 61, call; 62, identifier:x; 63, attribute; 64, identifier:schema_types; 65, identifier:attrgetter; 66, argument_list; 67, identifier:x; 68, identifier:schema_type; 69, string; 70, string_content:name
code: def get_schemas(cls, schema_types=None, sort=True):
          """
          Get schemas by type. If ``schema_type`` is None, return all schemas
  
          :param schema_types: list of schema types
          :type schema_types: list or None
          :param bool sort: sort by name
          :return: list of schemas
          :rtype: list
          """
          result = filter(lambda x: not x.is_inline_array, cls._schemas.values())
          if schema_types:
              result = filter(lambda x: x.schema_type in schema_types, result)
          if sort:
              result = sorted(result, key=attrgetter('name'))
          return result