tools/metrics/histograms/split_xml.py
def _GetCamelCaseName(node, depth=0):
  """Returns the first camelcase name part of the given |node|.

  Args:
    node: The node to get name from.
    depth: The depth that specifies which name part will be returned.
        e.g. For a node of name
        'CustomTabs.DynamicModule.CreatePackageContextTime'
        The returned camel name for depth 0 is 'Custom';
        The returned camel name for depth 1 is 'Dynamic';
        The returned camel name for depth 2 is 'Create'.

        Default depth is set to 0 as this function is imported and
        used in other files, where depth used is 0.

  Returns:
    The camelcase name part at specified depth. If the number of name parts is
    less than the depth, return 'others'.
  """
  name = node.getAttribute('name')
  split_string_list = name.split('.')
  if len(split_string_list) <= depth:
    return 'others'
  elif split_string_list[depth] in _PREDEFINED_NAMES_MAPPING:
    return _PREDEFINED_NAMES_MAPPING[split_string_list[depth]]
  else:
    name_part = split_string_list[depth]
    start_index = 0
    # |all_upper| is used to identify the case where the name is ABCDelta, in
    # which case the camel name of depth 0 should be ABC, instead of A.
    all_upper = True
    for index, letter in enumerate(name_part):
      if letter.islower() or letter.isnumeric():
        all_upper = False
      if letter.isupper() and not all_upper:
        start_index = index
        break

  if start_index == 0:
    return name_part
  else:
    return name_part[0:start_index]
Returns the first camelcase name part of the given |node|.

  Args:
    node: The node to get name from.
    depth: The depth that specifies which name part will be returned.
        e.g. For a node of name
        'CustomTabs.DynamicModule.CreatePackageContextTime'
        The returned camel name for depth 0 is 'Custom';
        The returned camel name for depth 1 is 'Dynamic';
        The returned camel name for depth 2 is 'Create'.

        Default depth is set to 0 as this function is imported and
        used in other files, where depth used is 0.

  Returns:
    The camelcase name part at specified depth. If the number of name parts is
    less than the depth, return 'others'.
  
Returns the first camelcase name part of the given |node|.
Returns the first camelcase name part of the given |node| .
def _GetCamelCaseName(node, depth=0):
  name = node.getAttribute('name')
  split_string_list = name.split('.')
  if len(split_string_list) <= depth:
    return 'others'
  elif split_string_list[depth] in _PREDEFINED_NAMES_MAPPING:
    return _PREDEFINED_NAMES_MAPPING[split_string_list[depth]]
  else:
    name_part = split_string_list[depth]
    start_index = 0
    all_upper = True
    for index, letter in enumerate(name_part):
      if letter.islower() or letter.isnumeric():
        all_upper = False
      if letter.isupper() and not all_upper:
        start_index = index
        break
  if start_index == 0:
    return name_part
  else:
    return name_part[0:start_index]
def _GetCamelCaseName ( node , depth = 0 ) : name = node . getAttribute ( 'name' ) split_string_list = name . split ( '.' ) if len ( split_string_list ) <= depth : return 'others' elif split_string_list [ depth ] in _PREDEFINED_NAMES_MAPPING : return _PREDEFINED_NAMES_MAPPING [ split_string_list [ depth ] ] else : name_part = split_string_list [ depth ] start_index = 0 all_upper = True for index , letter in enumerate ( name_part ) : if letter . islower ( ) or letter . isnumeric ( ) : all_upper = False if letter . isupper ( ) and not all_upper : start_index = index break if start_index == 0 : return name_part else : return name_part [ 0 : start_index ]
Returns the first camelcase name part of the given |node|.
Returns the first camelcase name part of the given |node| .
"""Returns the first camelcase name part of the given |node|.

  Args:
    node: The node to get name from.
    depth: The depth that specifies which name part will be returned.
        e.g. For a node of name
        'CustomTabs.DynamicModule.CreatePackageContextTime'
        The returned camel name for depth 0 is 'Custom';
        The returned camel name for depth 1 is 'Dynamic';
        The returned camel name for depth 2 is 'Create'.

        Default depth is set to 0 as this function is imported and
        used in other files, where depth used is 0.

  Returns:
    The camelcase name part at specified depth. If the number of name parts is
    less than the depth, return 'others'.
  """ # |all_upper| is used to identify the case where the name is ABCDelta, in # which case the camel name of depth 0 should be ABC, instead of A.
The camelcase name part at specified depth. If the number of name parts is
less than the depth, return 'others'.
The camelcase name part at specified depth . If the number of name parts is less than the depth return ' others ' .
node
The node to get name from.
The node to get name from .
depth
The depth that specifies which name part will be returned.
e.g. For a node of name
'CustomTabs.DynamicModule.CreatePackageContextTime'
The returned camel name for depth 0 is 'Custom';
The returned camel name for depth 1 is 'Dynamic';
The returned camel name for depth 2 is 'Create'.

Default depth is set to 0 as this function is imported and
used in other files, where depth used is 0.
The depth that specifies which name part will be returned . e . g . For a node of name ' CustomTabs . DynamicModule . CreatePackageContextTime ' The returned camel name for depth 0 is ' Custom ' ; The returned camel name for depth 1 is ' Dynamic ' ; The returned camel name for depth 2 is ' Create ' . Default depth is set to 0 as this function is imported and used in other files where depth used is 0 .