parameters: (item, length, allowed_types, name="item")
return_statement: return item
docstring: Broadcast item to given length.
  
      Parameters
      ----------
      item : object
          Object to broadcast
      length : int
          Length to broadcast to
      allowed_types : list
          List of allowed types
      name : str, optional
          Name of item
  
      Returns
      -------
      object:
          The original item broadcasted to sequence form of length
  
      Raises
      ------
      TypeError
docstring_summary: Broadcast item to given length.
docstring_tokens: Broadcast item to given length .
function: def broadcast(item, length, allowed_types, name="item"):
      """Broadcast item to given length.
  
      Parameters
      ----------
      item : object
          Object to broadcast
      length : int
          Length to broadcast to
      allowed_types : list
          List of allowed types
      name : str, optional
          Name of item
  
      Returns
      -------
      object:
          The original item broadcasted to sequence form of length
  
      Raises
      ------
      TypeError
  
  
      """
  
      if isinstance(item, allowed_types):
          return length * (item, )
      elif len(item) == 1:
          return length * item
      elif len(item) != length:
          raise TypeError(
              "'{0}' must be a single value, a list with one element or a list with {1} elements.".format(name, length))
      return item
function_tokens: def broadcast ( item , length , allowed_types , name = "item" ) : if isinstance ( item , allowed_types ) : return length * ( item , ) elif len ( item ) == 1 : return length * item elif len ( item ) != length : raise TypeError ( "'{0}' must be a single value, a list with one element or a list with {1} elements." . format ( name , length ) ) return item